FS#69658 - Remove CPPFLAGS and CFLAGS hacks from glibc PKGBUILD?
Attached to Project:
Arch Linux
Opened by Christer Solskogen (solskogen) - Tuesday, 16 February 2021, 16:33 GMT
Last edited by Allan McRae (Allan) - Friday, 19 February 2021, 03:49 GMT
Opened by Christer Solskogen (solskogen) - Tuesday, 16 February 2021, 16:33 GMT
Last edited by Allan McRae (Allan) - Friday, 19 February 2021, 03:49 GMT
|
Details
With this diff glibc builds fine. Are those hacks still
needed?
diff --git a/repos/core-x86_64/PKGBUILD b/repos/core-x86_64/PKGBUILD index 2f0b594..3a38dca 100644 --- a/repos/core-x86_64/PKGBUILD +++ b/repos/core-x86_64/PKGBUILD @@ -44,6 +44,10 @@ prepare() { } build() { + CFLAGS="${CPPFLAGS} ${CFLAGS}" + CXXFLAGS="${CPPFLAGS} ${CFLAGS}" + unset CPPFLAGS + local _configure_flags=( --prefix=/usr --with-headers=/usr/include @@ -69,28 +73,11 @@ build() { echo "sbindir=/usr/bin" >> configparms echo "rootsbindir=/usr/bin" >> configparms - # remove fortify for building libraries - CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/} - - # - CFLAGS=${CFLAGS/-fno-plt/} - CXXFLAGS=${CXXFLAGS/-fno-plt/} - LDFLAGS=${LDFLAGS/,-z,now/} - "$srcdir/glibc/configure" \ --libdir=/usr/lib \ --libexecdir=/usr/lib \ ${_configure_flags[@]} - # build libraries with fortify disabled - echo "build-programs=no" >> configparms - make - - # re-enable fortify for programs - sed -i "/build-programs=/s#no#yes#" configparms - - echo "CC += -D_FORTIFY_SOURCE=2" >> configparms - echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms make # build info pages manually for reprducibility @@ -105,26 +92,12 @@ build() { echo "sbindir=/usr/bin" >> configparms echo "rootsbindir=/usr/bin" >> configparms - # remove fortify for building libraries - CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/} - CFLAGS=${CFLAGS/-fno-plt/} - CXXFLAGS=${CXXFLAGS/-fno-plt/} - "$srcdir/glibc/configure" \ --host=i686-pc-linux-gnu \ --libdir=/usr/lib32 \ --libexecdir=/usr/lib32 \ ${_configure_flags[@]} - # build libraries with fortify disabled - echo "build-programs=no" >> configparms - make - - # re-enable fortify for programs - sed -i "/build-programs=/s#no#yes#" configparms - - echo "CC += -D_FORTIFY_SOURCE=2" >> configparms - echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms make } @@ -132,9 +105,6 @@ build() { check() { cd glibc-build - # remove fortify in preparation to run test-suite - sed -i '/FORTIFY/d' configparms - # some failures are "expected" make check || true } |
This task depends upon
Closed by Allan McRae (Allan)
Friday, 19 February 2021, 03:49 GMT
Reason for closing: Won't fix
Additional comments about closing: breaks stuff
Friday, 19 February 2021, 03:49 GMT
Reason for closing: Won't fix
Additional comments about closing: breaks stuff
Removing workarounds is great but consider that a) there should be _no_ increase in the testsuite failures and b) these workarounds might be due to "issues" in other packages. Ideally there would be inline bug references for each one - feel free to check through the log [1] and produce a neat list ;-)
[1] https://github.com/archlinux/svntogit-packages/blob/packages/glibc/trunk/PKGBUILD
Summary of test results:
16 FAIL
4337 PASS
16 UNSUPPORTED
13 XFAIL
6 XPASS
On lib32:
12 FAIL
4263 PASS
15 UNSUPPORTED
13 XFAIL
6 XPASS
On the original lib32 fails while 64bit I get this:
Summary of test results:
4353 PASS
16 UNSUPPORTED
13 XFAIL
6 XPASS
I get the same results.
current:
FAIL: elf/tst-cpu-features-cpuinfo
FAIL: misc/test-errno-linux
FAIL: misc/tst-mlock2
FAIL: misc/tst-pkey
FAIL: time/tst-adjtime
FAIL: time/tst-clock2
without flags:
FAIL: elf/circleload1
FAIL: elf/constload1
FAIL: elf/dblload
FAIL: elf/dblunload
FAIL: elf/ifuncmain6pie
FAIL: elf/lateglobal
FAIL: elf/reldep6
FAIL: elf/resolvfail
FAIL: elf/tst-audit4
FAIL: elf/tst-audit5
FAIL: elf/tst-audit6
FAIL: elf/tst-audit7
FAIL: elf/tst-cpu-features-cpuinfo
FAIL: elf/tst-global1
FAIL: elf/tst-initfinilazyfail
FAIL: elf/tst-latepthread
FAIL: misc/test-errno-linux
FAIL: misc/tst-mlock2
FAIL: misc/tst-pkey
FAIL: time/tst-adjtime
FAIL: time/tst-clock2
Edit: No they didn't. I was testing the wrong build.