freebsd.h (LIB_SPEC): Correctly handle -shared, -p and friends.
authorOllivier Robert <roberto@keltia.freenix.fr>
Wed, 28 Jan 1998 23:06:58 +0000 (00:06 +0100)
committerJeff Law <law@gcc.gnu.org>
Wed, 28 Jan 1998 23:06:58 +0000 (16:06 -0700)
        * i386/freebsd.h (LIB_SPEC): Correctly handle -shared, -p and friends.
        (LINK_SPEC): Likewise.
        (STARTFILE_SPEC): Likewise.

From-SVN: r17543

gcc/ChangeLog
gcc/config/i386/freebsd.h

index 141302c07dfec7f6c7d9aa73fd6359a04e232b0e..6f16703a2f47b2ed9a3280b956004c201f4b1bb5 100644 (file)
@@ -1,3 +1,9 @@
+Thu Jan 29 00:07:49 1998  Ollivier Robert <roberto@keltia.freenix.fr>
+
+       * i386/freebsd.h (LIB_SPEC): Correctly handle -shared, -p and friends.
+       (LINK_SPEC): Likewise.
+       (STARTFILE_SPEC): Likewise.
+
 1998-01-28  Mike Stump  <mrs@wrs.com>
 
        * rtlanal.c (dead_or_set_regno_p): Ignore REG_DEAD notes after
index 9aeb5aebcafa65a3ed357ab355e4959cca95c45a..892c69f2d05bd4c41530da3588f4fcbb8d9d31cf 100644 (file)
@@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA.  */
 #define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__ -D__386BSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
 
 /* Like the default, except no -lg.  */
-#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+#define LIB_SPEC "%{!shared:%{!pg:-lc}%{pg:-lc_p}}"
 
 #undef SIZE_TYPE
 #define SIZE_TYPE "unsigned int"
@@ -220,7 +220,15 @@ do {                                                                    \
 
 #define ASM_SPEC   " %| %{fpic:-k} %{fPIC:-k}"
 #define LINK_SPEC \
-  "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} %{assert*}"
+  "%{p:%e`-p' not supported; use `-pg' and gprof(1)} \
+   %{shared:-Bshareable} \
+   %{!shared:%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} \
+   %{pg:-Bstatic} %{Z}} \
+   %{assert*} %{R*}"
+
+#define STARTFILE_SPEC  \
+  "%{shared:c++rt0.o%s} \
+   %{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}"
 
 /* This is defined when gcc is compiled in the BSD-directory-tree, and must
  * make up for the gap to all the stuff done in the GNU-makefiles.