From 1b7555bd4c57528074dd943eb93cad594ef914b2 Mon Sep 17 00:00:00 2001 From: Ollivier Robert Date: Thu, 29 Jan 1998 00:06:58 +0100 Subject: [PATCH] freebsd.h (LIB_SPEC): Correctly handle -shared, -p and friends. * i386/freebsd.h (LIB_SPEC): Correctly handle -shared, -p and friends. (LINK_SPEC): Likewise. (STARTFILE_SPEC): Likewise. From-SVN: r17543 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/freebsd.h | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 141302c07df..6f16703a2f4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Thu Jan 29 00:07:49 1998 Ollivier Robert + + * i386/freebsd.h (LIB_SPEC): Correctly handle -shared, -p and friends. + (LINK_SPEC): Likewise. + (STARTFILE_SPEC): Likewise. + 1998-01-28 Mike Stump * rtlanal.c (dead_or_set_regno_p): Ignore REG_DEAD notes after diff --git a/gcc/config/i386/freebsd.h b/gcc/config/i386/freebsd.h index 9aeb5aebcaf..892c69f2d05 100644 --- a/gcc/config/i386/freebsd.h +++ b/gcc/config/i386/freebsd.h @@ -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. -- 2.30.2