Bug 1668822 - glibc: FTBFS due to GCC 9 warnings in nonshared libraries related to source fortification
Summary: glibc: FTBFS due to GCC 9 warnings in nonshared libraries related to source f...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: rawhide
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Florian Weimer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1576363 (view as bug list)
Depends On:
Blocks: 1576372
TreeView+ depends on / blocked
 
Reported: 2019-01-23 16:21 UTC by Florian Weimer
Modified: 2019-10-15 13:27 UTC (History)
10 users (show)

Fixed In Version: glibc-headers-2.28.9000-34
Clone Of:
Environment:
Last Closed: 2019-01-25 13:38:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Florian Weimer 2019-01-23 16:21:00 UTC
Attributes are inconsistent for the printf redirects in libnldbl_nonshared.a, and GCC 9 warns about that.

I will try to build the nonshared bits with annobin disabled and an assembler override present.

Comment 1 Florian Weimer 2019-01-25 13:38:59 UTC
cat > t.c <<EOF
#include <sys/stat.h>
#include <stdio.h>
	
int
main (void)
{
	printf ("%p\n", stat);
	printf ("%p\n", stat64);
}
EOF
gcc -D_GNU_SOURCE `rpm --eval "%{build_cflags} %{build_ldflags}"` t.c
annocheck -v a.out

Result:

$ annocheck -v a.out
annocheck: Version 8.69.
Hardened: a.out: PASS: No gaps found.
Hardened: a.out: PASS: Linked with -Wl,-z,now.
Hardened: a.out: PASS: Compiled with -fcf-protection.
Hardened: a.out: PASS: One dynamic section/segment found.
Hardened: a.out: PASS: Entry point instruction is ENDBR.
Hardened: a.out: PASS: Compiled with -D_FORTIFY_SOURCE=2.
Hardened: a.out: PASS: Compiled with -D_GLIBCXX_ASSERTIONS.
Hardened: a.out: PASS: Linked with -Wl,-z,relro.
Hardened: a.out: PASS: Stack not executable.
Hardened: a.out: PASS: Compiled with sufficient optimization.
Hardened: a.out: PASS: Compiled with PIC/PIE.
Hardened: a.out: PASS: Compiled as a position independent binary.
Hardened: a.out: PASS: Good GNU Property note.
Hardened: a.out: PASS: DT_RPATH/DT_RUNPATH absent or rooted at /usr.
Hardened: a.out: PASS: No RWX segments found.
Hardened: a.out: PASS: Consistent use of the -fshort-enum option.
Hardened: a.out: PASS: Compiled with -fstack-clash-protection.
Hardened: a.out: PASS: Compiled with sufficient stack protection.
Hardened: a.out: skip: Test for stack realignment support.  (Only needed on i686 binaries).
Hardened: a.out: PASS: No text relocations found.
Hardened: a.out: PASS: No thread cancellation problems.
Hardened: a.out: PASS: GOT/PLT relocations are read only.
Hardened: a.out: PASS.

So this is fixed: glibc builds again, and the nonshared bits are still annocheck-exempted.

Comment 2 Florian Weimer 2019-10-15 13:27:23 UTC
*** Bug 1576363 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.