Firm Bugtracker - libFirm
Viewing Issue Advanced Details
132 other major always 2013-12-20 06:15 2016-01-03 03:28
Anjbe  
Matze  
normal  
closed 1.21.0  
fixed  
none    
none  
0000132: libfirm cannot link with programs on OpenBSD
libfirm builds and installs fine on OpenBSD. However, anything linked against it fails:

$ cc foo.c -L/usr/local/lib -lfirm
/usr/local/lib/libfirm.so.0.0: undefined reference to `alloca'
collect2: ld returned 1 exit status

alloca() is not guaranteed by C99, and OpenBSD's stdlib.h doesn't provide it with -std=c99... maybe that is related.
Issue History
2013-12-20 06:15 Anjbe New Issue
2014-01-10 19:05 Matze Note Added: 0000199
2014-01-10 19:05 Matze Assigned To => Matze
2014-01-10 19:05 Matze Status new => resolved
2014-01-10 19:05 Matze Resolution open => fixed
2016-01-03 03:28 Matze Status resolved => closed

Notes
(0000199)
Matze   
2014-01-10 19:05   
I changed the logic in libfirm revision f4a064c5ef267943fe598a7d04f4542187a14509 to first use the gcc builtin if available. This should be fine for all the linuxes, bsds, ... since they all use compilers supporting this gcc builtin only win32 has an exception for malloc.h now.