aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorbsam <bsam@FreeBSD.org>2006-11-01 07:11:33 +0800
committerbsam <bsam@FreeBSD.org>2006-11-01 07:11:33 +0800
commit877f0114b02438bc41bea95aa3f3f12ea3fa2fc6 (patch)
tree3278252bcefc56aadefa784f5be5d590286a2e29 /lang
parent085b29e23d5d25af07b2a0fe2b70565f6c32e98f (diff)
downloadfreebsd-ports-gnome-877f0114b02438bc41bea95aa3f3f12ea3fa2fc6.tar.gz
freebsd-ports-gnome-877f0114b02438bc41bea95aa3f3f12ea3fa2fc6.tar.zst
freebsd-ports-gnome-877f0114b02438bc41bea95aa3f3f12ea3fa2fc6.zip
- improved handling of include paths in the GCC build process; [1]
- proper care is taken that only the bootstrap compiler is used [1] (silences core dump messages in configure); - bump PORTREVISION. [1] PR: 104301 [2] Submitted by: Vaclav Haisman <v.haisman at sh.cvut.cz> [2] Karel Miklav <karel at lovetemple.net> (maintainer) [1]
Diffstat (limited to 'lang')
-rw-r--r--lang/gnat-gcc34/Makefile35
-rw-r--r--lang/gnat-gcc34/files/patch-gcc-Makefile.in20
2 files changed, 41 insertions, 14 deletions
diff --git a/lang/gnat-gcc34/Makefile b/lang/gnat-gcc34/Makefile
index 47d7d1c816d3..76b6cdb572bf 100644
--- a/lang/gnat-gcc34/Makefile
+++ b/lang/gnat-gcc34/Makefile
@@ -8,7 +8,7 @@
PORTNAME= gnat-gcc
PORTVERSION= 3.4.6
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GCC}
MASTER_SITE_SUBDIR= releases/gcc-${PORTVERSION}
@@ -98,16 +98,16 @@ gnat_gcc!= if ${WHICH} gnatgcc > /dev/null 2>&1; then \
.endif
.if !empty(gnat_gcc) && !empty(gnat_bind)
-bootstrap_path!= if [ -x ${gnat_gcc} -a -x ${gnat_bind} ]; then \
+build_path!= if [ -x ${gnat_gcc} -a -x ${gnat_bind} ]; then \
${ECHO_CMD} "$$PATH"; \
else \
${ECHO_CMD} ""; \
fi
.else
-bootstrap_path=
+build_path=
.endif
-.if empty(bootstrap_path)
+.if empty(build_path)
DISTFILES+= gnat-3.15p-boot.tar.gz:boot
MASTER_SITES+= ${MASTER_SITE_LOCAL}:boot
MASTER_SITE_SUBDIR+= deischen/gcc/:boot
@@ -118,7 +118,8 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/compat/libc.so.4:${PORTSDIR}/misc/compat4x
compiler_data= GCC_EXEC_PREFIX=${WRKDIR}/adaboot/lib/gcc-lib/ \
ADA_INCLUDE_PATH=${WRKDIR}/adaboot/lib/gcc-lib/adainclude \
ADA_OBJECTS_PATH=${WRKDIR}/adaboot/lib/gcc-lib/adalib
-bootstrap_path= ${WRKDIR}/adaboot/bin:${PATH}
+bootstrap_path= ${WRKDIR}/adaboot/bin
+build_path= ${bootstrap_path}:${PATH}
gnat_gcc= adagcc
.endif
@@ -126,8 +127,8 @@ gnat_gcc= adagcc
CC= ${gnat_gcc}
# C compiler from GNAT 3.15 doesn't understand modern flags.
CFLAGS=
-CONFIGURE_ENV+= ${compiler_data} PATH=${bootstrap_path}
-MAKE_ENV+= ${compiler_data} PATH=${bootstrap_path} PTHREAD_LIBS=${PTHREAD_LIBS} CC=${CC}
+CONFIGURE_ENV+= ${compiler_data} PATH=${build_path}
+MAKE_ENV+= ${compiler_data} PATH=${build_path} PTHREAD_LIBS=${PTHREAD_LIBS} CC=${CC}
pre-everything::
@${ECHO_MSG} "Making GCC ${DISTNAME:S/^gcc-//} for ${OPSYS} ${OSREL} target=${CONFIGURE_TARGET}"
@@ -138,9 +139,13 @@ post-patch:
${WRKSRC}/gcc/version.c
pre-configure:
- cd ${WRKSRC} ; contrib/gcc_update --touch
+ cd ${WRKSRC}; contrib/gcc_update --touch
@${RM} -f ${WRKSRC}/gcc/*/*.info*
@${MKDIR} ${CONFIGURE_WRKSRC}
+ # Ada and C compilers should be the same.
+ if [ -d ${bootstrap_path} ]; then \
+ ${LN} -s ${bootstrap_path}/adagcc ${bootstrap_path}/cc; \
+ fi
do-build:
(cd ${BUILD_WRKSRC}; \
@@ -162,19 +167,21 @@ post-install:
${MV} -f ${PREFIX}/man/man7/$${mp}.7 \
${PREFIX}/man/man7/$${mp}${fsf_suffix}.7; \
done
- # Add target libraries and include files to packaging list.
+ # Prepare a temporary list of installed libraries and include files.
${RM} -f ${WRKDIR}/PLIST.lib
for d in ${targlib:S/^${PREFIX}\///} ${targlib:S/^${PREFIX}\///:S/lib/libexec/}; do \
- cd ${PREFIX} ; \
+ cd ${PREFIX}; \
if [ -d $${d} ]; then \
- ${FIND} $${d} -type f -o -type l >>${WRKDIR}/PLIST.lib ; \
- ${FIND} $${d} -type d | ${SORT} -r | ${SED} -e 's/^/@dirrm /g' >>${WRKDIR}/PLIST.lib ; \
- fi ; \
+ ${FIND} $${d} -type f -o -type l >>${WRKDIR}/PLIST.lib; \
+ ${FIND} $${d} -type d | ${SORT} -r | ${SED} -e 's/^/@dirrm /g' >>${WRKDIR}/PLIST.lib; \
+ fi; \
done
+ # Following directories should be removed on deinstal if empty. Add them to the temporary list.
${ECHO_CMD} "@unexec ${RMDIR} %D/lib/gcc/${CONFIGURE_TARGET} 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
${ECHO_CMD} "@unexec ${RMDIR} %D/lib/gcc 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
${ECHO_CMD} "@unexec ${RMDIR} %D/libexec/gcc/${CONFIGURE_TARGET} 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
${ECHO_CMD} "@unexec ${RMDIR} %D/libexec/gcc 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
- cd ${WRKDIR} ; ${SED} -i -e "/PLIST.lib/ r PLIST.lib" ${TMPPLIST}
+ # Insert the temporary list in the packing list.
+ cd ${WRKDIR}; ${SED} -i -e "/PLIST.lib/ r PLIST.lib" ${TMPPLIST}
.include <bsd.port.post.mk>
diff --git a/lang/gnat-gcc34/files/patch-gcc-Makefile.in b/lang/gnat-gcc34/files/patch-gcc-Makefile.in
new file mode 100644
index 000000000000..675cb9b10580
--- /dev/null
+++ b/lang/gnat-gcc34/files/patch-gcc-Makefile.in
@@ -0,0 +1,20 @@
+--- gcc/Makefile.in.orig Wed Oct 25 18:03:23 2006
++++ gcc/Makefile.in Wed Oct 25 18:05:34 2006
+@@ -710,7 +710,7 @@
+ $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) $(XCFLAGS) @DEFS@
+
+ # Likewise.
+-ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
++ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
+
+ # Build and host support libraries. FORBUILD is either
+ # .. or ../$(build_alias) depending on whether host != build.
+@@ -758,7 +758,7 @@
+ -I$(srcdir)/../include @INCINTL@
+
+ .c.o:
+- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
++ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION)
+
+ #
+ # Support for additional languages (other than C).