[MacPorts] #63469: gcc @7.5.0_2: Fails to link projects compiled with -fstack-protector-strong
MacPorts
noreply at macports.org
Fri Sep 10 14:59:55 UTC 2021
#63469: gcc @7.5.0_2: Fails to link projects compiled with -fstack-protector-strong
--------------------------+--------------------
Reporter: evanmiller | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Resolution: | Keywords:
Port: gcc7 cmocka |
--------------------------+--------------------
Comment (by kencu):
using apple-gcc42 on a simple hello, world c program we see this:
{{{
$ gcc-apple-4.2 -Wl,-v -fstack-protector -o hello1 hello.c
collect2 version 4.2.1 (Apple Inc. build 5666) (dot 3) (MacPorts apple-
gcc42 5666.3_16) (i686 Darwin)
/opt/local/libexec/apple-gcc42/gcc/i686-apple-darwin8/4.2.1/ld -dynamic
-arch i386 -macosx_version_min 10.4 -weak_reference_mismatches non-weak -o
hello1 -lcrt1.o -L/opt/local/lib/apple-gcc42/gcc/i686-apple-darwin8/4.2.1
-L/opt/local/lib/apple-gcc42/gcc/i686-apple-darwin8/4.2.1/../../.. -v
/var/tmp//ccX0kwXv.o -lssp_nonshared -lssp -lgcc_s.10.4 -lgcc -lSystem
@(#)PROGRAM:ld PROJECT:ld64-97.17
configured to support archs: i386 x86_64 ppc ppc64 armv6 armv7
Library search paths:
/opt/local/lib/apple-gcc42/gcc/i686-apple-darwin8/4.2.1
/opt/local/lib/apple-gcc42
/usr/lib
/usr/local/lib
Framework search paths:
/Library/Frameworks/
/System/Library/Frameworks/
ld: library not found for -lssp_nonshared
collect2: ld returned 1 exit status
}}}
so in this case, the gcc configuration has correctly noticed that the
libssp is needed on this system, it has correctly added the proper library
links to the link line, but the libraries, at least one of them, are not
there to link against, as presumably they are supposed to be on this
system.
--
Ticket URL: <https://trac.macports.org/ticket/63469#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list