Use a unified libgcc rather than a seperate one for threaded and

non-threaded programs.  This provides threaded programs with the
needed exception frame symbols.

parts submitted by:	Max Khon <fjoe@iclub.nsu.ru>
PR:	23252
This commit is contained in:
David E. O'Brien 2001-01-06 06:16:31 +00:00
parent cad1dd7bb4
commit 3f6014e672
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70703
12 changed files with 23 additions and 28 deletions

View File

@ -2,9 +2,11 @@
SUBDIR= csu libdialog libgcc libgmp libmp libregex libreadline
.if ${OBJFORMAT} == aout
.if !defined(NOLIBC_R)
SUBDIR+= libgcc_r
.endif
.endif
.if !defined(NO_CXX)
SUBDIR+= libstdc++

View File

@ -4,12 +4,15 @@ GCCDIR= ${.CURDIR}/../../../contrib/gcc.295
.PATH: ${GCCDIR}/cp ${GCCDIR}
# allow to be overridden for the a.out case
.if !defined(LIB) || ${LIB} != "gcc_r"
LIB= gcc
.endif
.if ${OBJFORMAT} == aout
# Install libgcc_pic.a, since ld.so uses it.
INSTALL_PIC_ARCHIVE= yes
.endif
#
# XXX This is a hack, but it seems to work. libgcc1.a is supposed to be
@ -59,6 +62,10 @@ SRCS= frame.c tinfo.cc tinfo2.cc new.cc exception.cc
CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I.
CFLAGS+= -fexceptions
CFLAGS+= -DIN_GCC
.if ${OBJFORMAT} != aout
#CFLAGS+= -D_PTHREADS -fPIC -DGTHREAD_USE_WEAK
CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK
.endif
CXXFLAGS+= -I${GCCDIR}/cp/inc
CXXFLAGS+= -nostdinc++

View File

@ -46,13 +46,3 @@
/* FreeBSD is 4.4BSD derived */
#define bsd4_4
/* Tell gcc to locate libgcc.a for us according to the -m rules. */
#undef LIBGCC_SPEC
#define LIBGCC_SPEC \
"%{!shared: \
%{!pthread:libgcc.a%s} \
%{pthread:libgcc_r.a%s}} \
%{shared: \
%{!pthread:libgcc_pic.a%s} \
%{pthread:libgcc_r_pic.a%s}}"

View File

@ -31,8 +31,8 @@ SHLIB_NAME= pam_cleartext_pass_ok.so
SRCS= pam_cleartext_pass_ok.c
CFLAGS+= -I${PAMDIR}/libpam/include
CFLAGS+= -Wall
DPADD= ${LIBSKEY} ${LIBGCC_PIC}
LDADD= -lskey -lgcc_pic
DPADD= ${LIBSKEY}
LDADD= -lskey
INTERNALLIB= yes
INTERNALSTATICLIB=yes

View File

@ -33,8 +33,6 @@ SHLIB_NAME= pam_deny.so
SRCS= pam_deny.c
CFLAGS+= -Wall
CFLAGS+= -I${PAMDIR}/libpam/include
DPADD+= ${LIBGCC_PIC}
LDADD+= -lgcc_pic
INTERNALLIB= yes
INTERNALSTATICLIB=yes

View File

@ -39,8 +39,8 @@ LDADD+= -lkrb
DPADD+= ${LIBCRYPTO}
LDADD+= -lcrypto
.endif
DPADD+= ${LIBGCC_PIC} ${LIBCOM_ERR}
LDADD+= -lgcc_pic -lcom_err
DPADD+= ${LIBCOM_ERR}
LDADD+= -lcom_err
INTERNALLIB= yes
INTERNALSTATICLIB=yes

View File

@ -33,8 +33,8 @@ SRCS= pam_opie.c
CFLAGS+= -Wall -g
CFLAGS+= -I${PAMDIR}/libpam/include
CFLAGS+= -I${.CURDIR}/../../libpam
DPADD+= ${LIBOPIE} ${LIBGCC_PIC}
LDADD+= -lopie -lgcc_pic
DPADD+= ${LIBOPIE}
LDADD+= -lopie
INTERNALLIB= yes
INTERNALSTATICLIB=yes

View File

@ -34,8 +34,6 @@ SRCS= pam_permit.c
CFLAGS+= -Wall
CFLAGS+= -I${PAMDIR}/libpam/include
CFLAGS+= -I${.CURDIR}/../../libpam
DPADD+= ${LIBGCC_PIC}
LDADD+= -lgcc_pic
INTERNALLIB= yes
INTERNALSTATICLIB=yes

View File

@ -32,8 +32,8 @@ SRCS= pam_radius.c
CFLAGS+= -Wall
CFLAGS+= -I${PAMDIR}/libpam/include
CFLAGS+= -I${.CURDIR}/../../libpam
DPADD+= ${LIBRADIUS} ${LIBGCC_PIC}
LDADD+= -lradius -lgcc_pic
DPADD+= ${LIBRADIUS}
LDADD+= -lradius
INTERNALLIB= yes
INTERNALSTATICLIB=yes

View File

@ -32,8 +32,8 @@ SRCS= pam_skey.c
CFLAGS+= -Wall
CFLAGS+= -I${PAMDIR}/libpam/include
CFLAGS+= -I${.CURDIR}/../../libpam
DPADD+= ${LIBSKEY} ${LIBGCC_PIC}
LDADD+= -lskey -lgcc_pic
DPADD+= ${LIBSKEY}
LDADD+= -lskey
INTERNALLIB= yes
INTERNALSTATICLIB=yes

View File

@ -32,8 +32,8 @@ SRCS= pam_tacplus.c
CFLAGS+= -Wall
CFLAGS+= -I${PAMDIR}/libpam/include
CFLAGS+= -I${.CURDIR}/../../libpam
DPADD+= ${LIBTACPLUS} ${LIBGCC_PIC}
LDADD+= -ltacplus -lgcc_pic
DPADD+= ${LIBTACPLUS}
LDADD+= -ltacplus
INTERNALLIB= yes
INTERNALSTATICLIB=yes

View File

@ -32,8 +32,8 @@ SRCS= pam_unix.c
CFLAGS+= -Wall
CFLAGS+= -I${PAMDIR}/libpam/include
CFLAGS+= -I${.CURDIR}/../../libpam
DPADD+= ${LIBUTIL} ${LIBGCC_PIC} ${LIBCRYPT}
LDADD+= -lutil -lgcc_pic -lcrypt
DPADD+= ${LIBUTIL} ${LIBCRYPT}
LDADD+= -lutil -lcrypt
INTERNALLIB= yes
INTERNALSTATICLIB=yes