summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2009-12-15 17:35:36 +0000
committerjoerg <joerg@pkgsrc.org>2009-12-15 17:35:36 +0000
commitefe0c55b8ab3cb7008b7bd4542e1eaa165df5cf0 (patch)
tree52e09274223d3f08d8727d1e2bee952a45812e37 /mk/compiler
parent91f53afb52268e4504f69ffe5fe72104d6a70738 (diff)
downloadpkgsrc-efe0c55b8ab3cb7008b7bd4542e1eaa165df5cf0.tar.gz
Update to libtool-2.2.6b. This switches libtool to the new main branch.
Changes are many, important for pkgsrc: - much higher speed (up to 30% faster for the overall build of libX11) - less magic for detection of the tag The pkgsrc integration of f2c has been changed to be more sane. libtool itself now depends on the f2c frontend to use proper auto-configuration and only fakes up the library. This part is encapsulated in mk/compiler/f2c.mk.
Diffstat (limited to 'mk/compiler')
-rw-r--r--mk/compiler/f2c.mk31
1 files changed, 20 insertions, 11 deletions
diff --git a/mk/compiler/f2c.mk b/mk/compiler/f2c.mk
index 70cc214f717..d288ba6eadb 100644
--- a/mk/compiler/f2c.mk
+++ b/mk/compiler/f2c.mk
@@ -1,4 +1,4 @@
-# $NetBSD: f2c.mk,v 1.12 2009/12/03 12:44:10 asau Exp $
+# $NetBSD: f2c.mk,v 1.13 2009/12/15 17:35:36 joerg Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -40,16 +40,6 @@ COMPILER_F2C_MK= defined
.include "../../mk/bsd.prefs.mk"
-.if !empty(PKGPATH:Mlang/f2c) || !empty(PKGPATH:Mdevel/patch) || \
- !empty(PKGPATH:Mdevel/libtool-base)
-IGNORE_F2C= yes
-MAKEFLAGS+= IGNORE_F2C=yes
-.endif
-
-.if defined(IGNORE_F2C)
-_USE_F2C= NO
-.endif
-
# LANGUAGES.<compiler> is the list of supported languages by the compiler.
# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the ones
# requested by the package in USE_LANGUAGES.
@@ -99,12 +89,31 @@ PREPEND_PATH+= ${_F2C_DIR}/bin
# Dependencies:
BUILD_DEPENDS+= f2c>20090411:../../lang/f2c # translator
+
+.if empty(PKGPATH:Mdevel/libtool-base) # See below
. include "../../devel/libf2c/buildlink3.mk" # library
+.endif
. if defined(F2C_DIR) && !empty(F2C_DIR)
PKGSRC_MAKE_ENV+= F2C_DIR=${F2C_DIR:Q}
. endif
+# libtool-base is special as it only needs f77 to extract linker flags etc.
+.if !empty(PKGPATH:Mdevel/libtool-base)
+pre-configure: fake-f2c-libs
+
+_WRAP_EXTRA_ARGS.FC+= -L${WRKDIR}/.f2c/lib -I${WRKDIR}/.f2c/include
+
+fake-f2c-libs:
+ ${MKDIR} ${WRKDIR}/.f2c/include
+ ${MKDIR} ${WRKDIR}/.f2c/lib
+ ${ECHO} 'int main(void) { return 0; }' > ${WRKDIR}/.f2c/lib/main.c
+ ${CC} -c -o ${WRKDIR}/.f2c/lib/main.o ${WRKDIR}/.f2c/lib/main.c
+ ${AR} cq ${WRKDIR}/.f2c/lib/libf2c.a ${WRKDIR}/.f2c/lib/main.o
+ ${RANLIB} ${WRKDIR}/.f2c/lib/libf2c.a
+ ${TOUCH} ${WRKDIR}/.f2c/include/f2c.h
+.endif
+
# Create symlinks for the compiler into ${WRKDIR}.
. for _var_ in ${_F2C_VARS}
. if !target(${_F2C_${_var_}})