Various changes to support building shared lib{g,stdc}++
This commit is contained in:
parent
2492f942fc
commit
45329a2cbd
@ -59,6 +59,12 @@ mh-sysv
|
||||
mh-sysv4
|
||||
mh-vaxult2
|
||||
mt-v810
|
||||
mt-x86pic
|
||||
mt-papic
|
||||
mt-sparcpic
|
||||
mh-papic
|
||||
mh-x86pic
|
||||
mh-sparcpic
|
||||
|
||||
Things-to-lose:
|
||||
|
||||
|
2
config/mh-papic
Normal file
2
config/mh-papic
Normal file
@ -0,0 +1,2 @@
|
||||
LIBCFLAGS=$(CFLAGS) -fPIC
|
||||
LIBCXXFLAGS=$(CXXFLAGS) -fPIC
|
2
config/mh-sparcpic
Normal file
2
config/mh-sparcpic
Normal file
@ -0,0 +1,2 @@
|
||||
LIBCFLAGS=$(CFLAGS) -fpic
|
||||
LIBCXXFLAGS=$(CXXFLAGS) -fpic
|
2
config/mh-x86pic
Normal file
2
config/mh-x86pic
Normal file
@ -0,0 +1,2 @@
|
||||
LIBCFLAGS=$(CFLAGS) -fpic
|
||||
LIBCXXFLAGS=$(CXXFLAGS) -fpic
|
2
config/mt-papic
Normal file
2
config/mt-papic
Normal file
@ -0,0 +1,2 @@
|
||||
LIBCFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET) -fPIC
|
||||
LIBCXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET) -fPIC
|
2
config/mt-sparcpic
Normal file
2
config/mt-sparcpic
Normal file
@ -0,0 +1,2 @@
|
||||
LIBCFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET) -fpic
|
||||
LIBCXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET) -fpic
|
2
config/mt-x86pic
Normal file
2
config/mt-x86pic
Normal file
@ -0,0 +1,2 @@
|
||||
LIBCFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET) -fpic
|
||||
LIBCXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET) -fpic
|
32
configure.in
32
configure.in
@ -153,6 +153,30 @@ case "${host}" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# We default to --with-shared on platforms where -fpic is meaningless.
|
||||
# Well, we don't yet, but we will.
|
||||
if false && [ "${host}" = "${target}" ] && [ x${enable_shared} = x ]; then
|
||||
case "${target}" in
|
||||
alpha-dec-osf*) enable_shared=yes ;;
|
||||
mips-sgi-irix5*) enable_shared=yes ;;
|
||||
*) enable_shared=no ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ x${enable_shared} = xyes ]; then
|
||||
waugh=
|
||||
case "${host}" in
|
||||
hppa*-*-*) waugh=config/mh-papic ;;
|
||||
i[345]86-*-*) waugh=config/mh-x86pic ;;
|
||||
*-*-*) waugh=config/mh-${target_cpu}pic ;;
|
||||
esac
|
||||
if [ -n "${host_makefile_frag}" ] && [ -f ${srcdir}/${waugh} ]; then
|
||||
cat ${srcdir}/${host_makefile_frag} > mh-frag
|
||||
cat ${srcdir}/${waugh} >> mh-frag
|
||||
host_makefile_frag=mh-frag
|
||||
fi
|
||||
fi
|
||||
|
||||
# per-target:
|
||||
|
||||
case "${target}" in
|
||||
@ -498,6 +522,14 @@ if [ x${use_gnu_ld} = x ] ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ x${enable_shared} = xyes ]; then
|
||||
case "${target}" in
|
||||
hppa*-*-*) target_makefile_frag=config/mt-papic ;;
|
||||
i[345]86-*-*) target_makefile_frag=config/mt-x86pic ;;
|
||||
*-*-*) target_makefile_frag=config/mt-${target_cpu}pic ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
#
|
||||
# Local Variables:
|
||||
# fill-column: 131
|
||||
|
Loading…
Reference in New Issue
Block a user