1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-17 00:00:40 +00:00
freebsd-ports/lang/gcc28/Makefile
John Polstra 2c8f4253cc Fix this port so that it can find crt0.o in /usr/lib/aout on recent
-current systems.

Fix the definition of the preprocessor symbol __FreeBSD__.  It had
been defined as "2=3".

Implement support for weak symbols.  This solves the "___error"
undefined problem on -current systems.

Default to -fsjlj-exceptions even for C programs.  This is needed
because a few modules in libgcc are built with -fexceptions turned
on, and the default style of exception support causes croakage.

I tried a make buildworld on a recent -current system by adding the
following to /etc/make.conf:

CC=/usr/local/bin/gcc28 -B/usr/local/lib/gcc-lib/i386-unknown-freebsd3.0/2.8.1/
CXX=/usr/local/bin/g++28 -B/usr/local/lib/gcc-lib/i386-unknown-freebsd3.0/2.8.1/

It got pretty far along before dying.  The death occurred when building
our old native libstdc++, almost certainly because of header file
incompatibilities.

Another obstacle for make world is that this port doesn't currently
build a PIC version of libgcc (libgcc_pic.a).
1998-06-30 21:10:27 +00:00

61 lines
1.8 KiB
Makefile

# ex:ts=8
# Ports collection makefile for: gcc
# Version required: 2.8.0
# Date created: 17 Jan 1998
# Whom: David O'Brien <obrien@NUXI.com>
#
# $Id: Makefile,v 1.10 1998/06/10 20:16:08 asami Exp $
#
DISTNAME= gcc-2.8.1
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU}
MAINTAINER= obrien@FreeBSD.org
GNUOSREL!= uname -r | sed -e 's/[-(].*//'
PLIST= ${WRKDIR}/PLIST.fixedup
GNUHOST= i386-unknown-freebsd${GNUOSREL}
CONFIGURE_ARGS= --with-gxx-include-dir=${PREFIX}/lib/gcc-lib/${GNUHOST}/2.8.1/include/g++
GNU_CONFIGURE= yes
USE_GMAKE= yes
ALL_TARGET= bootstrap
MAN1= cccp28.1 g++28.1 gcc28.1
pre-fetch:
@${ECHO} "GCC ${DISTNAME:S/^gcc-//} for ${OSNAME} ${GNUOSREL}"
post-patch:
@(cd ${WRKSRC}/config/i386/ ; \
MAJ=`sysctl -n kern.osreldate | ${SED} -e '/.....$$/s///'` ; \
${MV} freebsd.h freebsd.h.in ; \
${SED} -e "s:__FreeBSD__=[0-9]*:__FreeBSD__=$${MAJ}:" freebsd.h.in \
>freebsd.h ; \
${MV} freebsd-elf.h freebsd-elf.h.in ; \
${SED} -e "s:__FreeBSD__=[0-9]*:__FreeBSD__=$${MAJ}:" freebsd-elf.h.in \
>freebsd-elf.h)
pre-install:
@${SED} -e 's:%GNUHOST%:${GNUHOST}:' ${PKGDIR}/PLIST \
> ${PLIST}
post-install:
@${RM} -f ${PREFIX}/bin/c++
(for prog in ${PREFIX}/bin/gcc ${PREFIX}/bin/g++ ${PREFIX}/bin/gcov \
${PREFIX}/bin/protoize ${PREFIX}/bin/unprotoize \
${PREFIX}/bin/${GNUHOST}-gcc \
${PREFIX}/lib/gcc-lib/${GNUHOST}/2.8.1/cc1 \
${PREFIX}/lib/gcc-lib/${GNUHOST}/2.8.1/cc1obj \
${PREFIX}/lib/gcc-lib/${GNUHOST}/2.8.1/cc1plus \
${PREFIX}/lib/gcc-lib/${GNUHOST}/2.8.1/cpp ; \
do strip $$prog ; \
done)
ln -f ${PREFIX}/bin/gcc ${PREFIX}/bin/gcc28
ln -f ${PREFIX}/bin/g++ ${PREFIX}/bin/g++28
@${MV} ${PREFIX}/man/man1/cccp.1 ${PREFIX}/man/man1/cccp28.1
@${MV} ${PREFIX}/man/man1/g++.1 ${PREFIX}/man/man1/g++28.1
@${MV} ${PREFIX}/man/man1/gcc.1 ${PREFIX}/man/man1/gcc28.1
.include <bsd.port.mk>