Opened 4 years ago

Last modified 3 years ago

#12791 assigned bug

GCC 5.3.0 libssp problem -- broken stack protector

Reported by: kallisti5 Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System/runtime_loader Version: R1/Development
Keywords: gcc libssp Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Potentially related to #6661

Attempting to compile Ruby results in "cannot determine size of long long"

A little digging through the logs shows:

gcc -o conftest -O3 -fno-fast-math -ggdb3 -std=iso9899:1999 -fstack-protector conftest.c

executing said 'conftest' results in:

runtime_loader: Cannot open file libssp.so.0: No such file or directory

A quick test.c with a minimal main shows that the -fstack-protector flag triggers the error. Any binary compiled with -fstack-protector ends up missing libssp.so.0

As this is a issue with our compiler that will likely break quite a few ports in a "hard to fix later" way, i'm flagging this as a blocker.

Change History (7)

comment:1 by kallisti5, 4 years ago

seen on x86_64 hrev50321

comment:2 by kallisti5, 4 years ago

maybe libssp.so.0 is missing from the recipe? I don't see a reason we shouldn't continue with the shared version.

https://github.com/haikuports/haikuports/blob/master/sys-devel/gcc/gcc-5.3.0_2016_02_29.recipe#L184

Is that the right recipe? No idea. Out of time for now.

comment:3 by pulkomandy, 4 years ago

The stack protection needs OS specific support and as far as I know it was not ported to Haiku yet. Ruby configure script should check wether the flag actually works, before using it.

It would be a good idea to add support for it in Haiku, but a bit more work. We can start by enabling --enable-libssp in gcc configure script and see what happens.

comment:4 by korli, 4 years ago

Owner: changed from nobody to korli
Priority: blockernormal
Status: newassigned

There doesn't seem to be many ports hardcoding this flag, unsetting blocker priority.

comment:5 by waddlesplash, 3 years ago

Milestone: R1/beta1Unscheduled

And bumping to unscheduled; if nobody uses this, it's not important.

comment:7 by korli, 3 years ago

Owner: changed from korli to nobody
Note: See TracTickets for help on using tickets.