Make sure to pass the PIC flag when linking.
This commit is contained in:
parent
1b1dbb8dd0
commit
fa4cee34db
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-configure_in,v 1.5 2003/12/30 22:21:25 sturm Exp $
|
||||
--- configure.in.orig 2003-03-29 23:25:17.000000000 +0100
|
||||
+++ configure.in 2003-12-30 19:14:57.000000000 +0100
|
||||
@@ -827,14 +827,14 @@ then
|
||||
$OpenBSD: patch-configure_in,v 1.6 2004/05/12 22:27:24 brad Exp $
|
||||
--- configure.in.orig 2003-03-29 17:25:17.000000000 -0500
|
||||
+++ configure.in 2004-04-19 21:37:54.000000000 -0400
|
||||
@@ -827,14 +827,28 @@ then
|
||||
Linux*) LDSHARED='$(CC) -shared';;
|
||||
dgux*) LDSHARED="ld -G";;
|
||||
BSD/OS*/4*) LDSHARED="gcc -shared";;
|
||||
@ -14,11 +14,25 @@ $OpenBSD: patch-configure_in,v 1.5 2003/12/30 22:21:25 sturm Exp $
|
||||
LDSHARED="ld -Bshareable ${LDFLAGS}"
|
||||
fi;;
|
||||
- NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
|
||||
+ OpenBSD*|NetBSD*) LDSHARED="${CC} -shared ${LDFLAGS}";;
|
||||
+ OpenBSD*)
|
||||
+ if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
|
||||
+ then
|
||||
+ LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
|
||||
+ else
|
||||
+ case `uname -r` in
|
||||
+ [[01]].* | 2.[[0-7]] | 2.[[0-7]].*)
|
||||
+ LDSHARED="ld -Bshareable ${LDFLAGS}"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
|
||||
+ ;;
|
||||
+ esac
|
||||
+ fi;;
|
||||
+ NetBSD*) LDSHARED="${CC} -shared ${LDFLAGS}";;
|
||||
OpenUNIX*|UnixWare*)
|
||||
if test "$GCC" = "yes"
|
||||
then LDSHARED="$(CC) -shared"
|
||||
@@ -1083,8 +1083,8 @@ yes
|
||||
@@ -1083,8 +1097,8 @@ yes
|
||||
# on HP/UX, pthread.h renames pthread_create to a different symbol name.
|
||||
# So we really have to include pthread.h, and then link.
|
||||
_libs=$LIBS
|
||||
@ -29,7 +43,7 @@ $OpenBSD: patch-configure_in,v 1.5 2003/12/30 22:21:25 sturm Exp $
|
||||
AC_TRY_LINK([#include <pthread.h>
|
||||
|
||||
void * start_routine (void *arg) { exit (0); }], [
|
||||
@@ -1102,7 +1102,7 @@ pthread_create (NULL, NULL, start_routin
|
||||
@@ -1102,7 +1116,7 @@ pthread_create (NULL, NULL, start_routin
|
||||
LIBOBJS="$LIBOBJS thread.o"],[
|
||||
AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD)
|
||||
posix_threads=yes
|
||||
@ -38,7 +52,7 @@ $OpenBSD: patch-configure_in,v 1.5 2003/12/30 22:21:25 sturm Exp $
|
||||
LIBOBJS="$LIBOBJS thread.o"], [
|
||||
AC_CHECK_LIB(c_r, pthread_create, [AC_DEFINE(WITH_THREAD)
|
||||
posix_threads=yes
|
||||
@@ -1114,7 +1114,7 @@ pthread_create (NULL, NULL, start_routin
|
||||
@@ -1114,7 +1128,7 @@ pthread_create (NULL, NULL, start_routin
|
||||
LIBOBJS="$LIBOBJS thread.o"], [
|
||||
AC_CHECK_LIB(pthread, __pthread_create_system, [AC_DEFINE(WITH_THREAD)
|
||||
posix_threads=yes
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-configure_in,v 1.3 2004/04/18 12:13:58 sturm Exp $
|
||||
--- configure.in.orig 2003-11-18 20:59:39.000000000 +0100
|
||||
+++ configure.in 2004-04-18 11:59:09.000000000 +0200
|
||||
$OpenBSD: patch-configure_in,v 1.4 2004/05/12 22:27:24 brad Exp $
|
||||
--- configure.in.orig 2003-11-18 14:59:39.000000000 -0500
|
||||
+++ configure.in 2004-04-19 21:28:02.000000000 -0400
|
||||
@@ -136,7 +136,7 @@ case $ac_sys_system/$ac_sys_release in
|
||||
# On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
|
||||
# even though select is a POSIX function. Reported by J. Ribbens.
|
||||
@ -10,7 +10,7 @@ $OpenBSD: patch-configure_in,v 1.3 2004/04/18 12:13:58 sturm Exp $
|
||||
define_xopen_source=no;;
|
||||
# On Solaris 2.6, sys/wait.h is inconsistent in the usage
|
||||
# of union __?sigval. Reported by Stuart Bishop.
|
||||
@@ -1279,14 +1279,14 @@ then
|
||||
@@ -1279,14 +1279,28 @@ then
|
||||
Linux*|GNU*) LDSHARED='$(CC) -shared';;
|
||||
dgux*) LDSHARED="ld -G";;
|
||||
BSD/OS*/4*) LDSHARED="gcc -shared";;
|
||||
@ -23,11 +23,25 @@ $OpenBSD: patch-configure_in,v 1.3 2004/04/18 12:13:58 sturm Exp $
|
||||
LDSHARED="ld -Bshareable ${LDFLAGS}"
|
||||
fi;;
|
||||
- NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
|
||||
+ OpenBSD*|NetBSD*) LDSHARED="${CC} -shared ${LDFLAGS}";;
|
||||
+ OpenBSD*)
|
||||
+ if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
|
||||
+ then
|
||||
+ LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
|
||||
+ else
|
||||
+ case `uname -r` in
|
||||
+ [[01]].* | 2.[[0-7]] | 2.[[0-7]].*)
|
||||
+ LDSHARED="ld -Bshareable ${LDFLAGS}"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
|
||||
+ ;;
|
||||
+ esac
|
||||
+ fi;;
|
||||
+ NetBSD*) LDSHARED="${CC} -shared ${LDFLAGS}";;
|
||||
OpenUNIX*|UnixWare*)
|
||||
if test "$GCC" = "yes"
|
||||
then LDSHARED='$(CC) -shared'
|
||||
@@ -1423,9 +1423,10 @@ AC_CHECK_LIB(dld, shl_load) # Dynamic li
|
||||
@@ -1423,9 +1437,10 @@ AC_CHECK_LIB(dld, shl_load) # Dynamic li
|
||||
|
||||
# only check for sem_ini if thread support is requested
|
||||
if test "$with_threads" = "yes" -o -z "$with_threads"; then
|
||||
|
Loading…
Reference in New Issue
Block a user