Patch #455231: Support ELF properly on OpenBSD.
This commit is contained in:
parent
44f8696171
commit
36546db750
|
@ -16,7 +16,7 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __OpenBSD__
|
#if defined(__OpenBSD__) && !defined(__ELF__)
|
||||||
#define LEAD_UNDERSCORE "_"
|
#define LEAD_UNDERSCORE "_"
|
||||||
#else
|
#else
|
||||||
#define LEAD_UNDERSCORE ""
|
#define LEAD_UNDERSCORE ""
|
||||||
|
|
15
configure.in
15
configure.in
|
@ -673,15 +673,7 @@ then
|
||||||
Linux*) LDSHARED="gcc -shared";;
|
Linux*) LDSHARED="gcc -shared";;
|
||||||
dgux*) LDSHARED="ld -G";;
|
dgux*) LDSHARED="ld -G";;
|
||||||
BSD/OS*/4*) LDSHARED="gcc -shared";;
|
BSD/OS*/4*) LDSHARED="gcc -shared";;
|
||||||
OpenBSD*) LDSHARED="ld -Bshareable";;
|
OpenBSD*|NetBSD*|FreeBSD*)
|
||||||
NetBSD*)
|
|
||||||
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
|
|
||||||
then
|
|
||||||
LDSHARED="cc -shared"
|
|
||||||
else
|
|
||||||
LDSHARED="ld -Bshareable"
|
|
||||||
fi;;
|
|
||||||
FreeBSD*)
|
|
||||||
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
|
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
|
||||||
then
|
then
|
||||||
LDSHARED="cc -shared ${LDFLAGS}"
|
LDSHARED="cc -shared ${LDFLAGS}"
|
||||||
|
@ -716,8 +708,7 @@ then
|
||||||
fi;;
|
fi;;
|
||||||
Linux*) CCSHARED="-fPIC";;
|
Linux*) CCSHARED="-fPIC";;
|
||||||
BSD/OS*/4*) CCSHARED="-fpic";;
|
BSD/OS*/4*) CCSHARED="-fpic";;
|
||||||
OpenBSD*) CCSHARED="-fpic";;
|
FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
|
||||||
FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
|
|
||||||
UnixWare*)
|
UnixWare*)
|
||||||
if test "$GCC" = "yes"
|
if test "$GCC" = "yes"
|
||||||
then CCSHARED="-fPIC"
|
then CCSHARED="-fPIC"
|
||||||
|
@ -762,7 +753,7 @@ then
|
||||||
UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
|
UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
|
||||||
SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
|
SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
|
||||||
ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
|
ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
|
||||||
FreeBSD*|NetBSD*)
|
FreeBSD*|NetBSD*|OpenBSD*)
|
||||||
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
|
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
|
||||||
then
|
then
|
||||||
LINKFORSHARED="-Wl,--export-dynamic"
|
LINKFORSHARED="-Wl,--export-dynamic"
|
||||||
|
|
Loading…
Reference in New Issue