SHA256
3
0
forked from pool/expect

Accepting request 887314 from home:mgerstner:branches:devel:languages:tcl

- pass explicit -pie flag to CFLAGS and hack `make` invocation so that
  /usr/bin/expect actually becomes a PIE binary. This is especially awkard
  since the expect build system implicitly passes -fPIC which breaks our
  gcc-PIE package, but does not pass -pie while linking the executable.
  Shared libraries are also not linked with -shared so we need to explicitly
  pass this, too, to avoid build breakage (bsc#1184122).

OBS-URL: https://build.opensuse.org/request/show/887314
OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/expect?expand=0&rev=26
This commit is contained in:
Reinhard Max 2021-05-03 13:06:21 +00:00 committed by Git OBS Bridge
parent 73531d7b46
commit 70b5579646
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Apr 21 13:13:28 UTC 2021 - Matthias Gerstner <matthias.gerstner@suse.com>
- pass explicit -pie flag to CFLAGS and hack `make` invocation so that
/usr/bin/expect actually becomes a PIE binary. This is especially awkard
since the expect build system implicitly passes -fPIC which breaks our
gcc-PIE package, but does not pass -pie while linking the executable.
Shared libraries are also not linked with -shared so we need to explicitly
pass this, too, to avoid build breakage (bsc#1184122).
-------------------------------------------------------------------
Thu Oct 15 08:18:32 UTC 2020 - Reinhard Max <max@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package expect
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -59,13 +59,14 @@ expect package loaded.
%patch4
%build
export CFLAGS="%{optflags} -fPIC -pie"
autoreconf
%configure \
--with-tcl=%_libdir \
--with-tk=no_tk \
--with-tclinclude=%_includedir \
--enable-shared
make %{?_smp_mflags} all pkglibdir=%_libdir/tcl/%name%version
make SHLIB_CFLAGS="-shared" %{?_smp_mflags} all pkglibdir=%_libdir/tcl/%name%version
%check
make %{?_smp_mflags} test