This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: libtool tweaks for DJGPP
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Subject: PATCH: libtool tweaks for DJGPP
- From: Laurynas Biveinis <lauras at softhome dot net>
- Date: Sat, 09 Dec 2000 21:17:50 +0100
This patch is necessarry to get working libstdc++-v3 for DJGPP.
Basically it stops ever using -fPIC -DPIC flags for DJGPP.
Of course, this patch should be sent for upstream libtool maintainers,
shouldn't it?
Laurynas
2000-12-09 Laurynas Biveinis <lauras@softhome.net>
* ltcf-c.sh: clear ac_cv_prog_cc_pic for DJGPP. Do not add
'-DPIC' to ac_cv_prog_cc_pic for DJGPP.
* ltcf-cxx.sh: likewise.
* ltcf-gcj.sh: likewise.
* ltconfig.sh: fix typo.
Index: ltcf-c.sh
===================================================================
RCS file: /cvs/gcc/egcs/ltcf-c.sh,v
retrieving revision 1.5
diff -u -r1.5 ltcf-c.sh
--- ltcf-c.sh 2000/11/13 00:49:03 1.5
+++ ltcf-c.sh 2000/12/09 19:02:34
@@ -548,6 +548,10 @@
# we not sure about C++ programs.
ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ ac_cv_prog_cc_pic=
+ ;;
cygwin* | mingw* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
@@ -642,7 +646,16 @@
;;
esac
fi
- ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
+ case "$host_os" in
+ # Platforms which do not suport PIC and -DPIC is meaningless
+ # on them:
+ *djgpp*)
+ ac_cv_prog_cc_pic=
+ ;;
+ *)
+ ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
+ ;;
+ esac
fi
need_lc=yes
Index: ltcf-cxx.sh
===================================================================
RCS file: /cvs/gcc/egcs/ltcf-cxx.sh,v
retrieving revision 1.6
diff -u -r1.6 ltcf-cxx.sh
--- ltcf-cxx.sh 2000/11/22 18:31:25 1.6
+++ ltcf-cxx.sh 2000/12/09 19:02:36
@@ -595,6 +595,10 @@
# we not sure about C++ programs.
ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ ac_cv_prog_cc_pic=
+ ;;
cygwin* | mingw* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
@@ -786,7 +790,17 @@
;;
esac
fi
-ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
+
+case "$host_os" in
+ # Platforms which do not suport PIC and -DPIC is meaningless
+ # on them:
+ *djgpp*)
+ ac_cv_prog_cc_pic=
+ ;;
+ *)
+ ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
+ ;;
+esac
# Figure out "hidden" C++ library dependencies from verbose
Index: ltcf-gcj.sh
===================================================================
RCS file: /cvs/gcc/egcs/ltcf-gcj.sh,v
retrieving revision 1.2
diff -u -r1.2 ltcf-gcj.sh
--- ltcf-gcj.sh 2000/09/06 13:59:29 1.2
+++ ltcf-gcj.sh 2000/12/09 19:02:37
@@ -546,6 +546,10 @@
# we not sure about C++ programs.
ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
;;
+ *djgpp*)
+ # DJGPP does not suppot shared libraries at all
+ ac_cv_prog_cc_pic=
+ ;;
cygwin* | mingw* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
Index: ltconfig
===================================================================
RCS file: /cvs/gcc/egcs/ltconfig,v
retrieving revision 1.12
diff -u -r1.12 ltconfig
--- ltconfig 2000/11/22 18:31:25 1.12
+++ ltconfig 2000/12/09 19:02:44
@@ -1275,7 +1275,7 @@
;;
esac
-# Handle CRLF in mingw too chain
+# Handle CRLF in mingw tool chain
opt_cr=
case "$host_os" in
mingw*)