From d76e21baeefa4eb33d5623084fb8a1b94449509d Mon Sep 17 00:00:00 2001
From: dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 2 Jan 2001 15:55:07 +0000
Subject: [PATCH] * 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38624 138bc75d-0d04-0410-961f-82ee72b054a4
---
 ChangeLog   |  8 ++++++++
 ltcf-c.sh   | 15 ++++++++++++++-
 ltcf-cxx.sh | 16 +++++++++++++++-
 ltcf-gcj.sh |  4 ++++
 ltconfig    |  2 +-
 5 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e99b756d4f22..b084ddf141c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-01-02  Laurynas Biveinis  &lt;lauras@softhome.net&gt;
+
+	* 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.
+
 2001-01-02  Laurynas Biveinis  <lauras@softhome.net>
 
 	* configure: handle DOS-style absolute paths.
diff --git a/ltcf-c.sh b/ltcf-c.sh
index 57df16c939bc..4ce77fc472a2 100644
--- a/ltcf-c.sh
+++ b/ltcf-c.sh
@@ -548,6 +548,10 @@ else
       # 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 @@ else
       ;;
     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
diff --git a/ltcf-cxx.sh b/ltcf-cxx.sh
index fbcf248faa7f..9c7782f2791a 100644
--- a/ltcf-cxx.sh
+++ b/ltcf-cxx.sh
@@ -595,6 +595,10 @@ if test "$with_gcc" = yes; then
     # 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 @@ else
       ;;
   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
diff --git a/ltcf-gcj.sh b/ltcf-gcj.sh
index acb30c0ace15..dd46e0cd73b9 100644
--- a/ltcf-gcj.sh
+++ b/ltcf-gcj.sh
@@ -546,6 +546,10 @@ fi
       # 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).
diff --git a/ltconfig b/ltconfig
index 25d1c6479151..2f54843f54dd 100755
--- a/ltconfig
+++ b/ltconfig
@@ -1275,7 +1275,7 @@ sysv4)
   ;;
 esac
 
-# Handle CRLF in mingw too chain
+# Handle CRLF in mingw tool chain
 opt_cr=
 case "$host_os" in
 mingw*)
-- 
GitLab