Weak aliases are unsupported on Darwin, so don't do it. Fixes lots of

dependencies.

Bump PKGREVISION.
This commit is contained in:
jperkin 2014-02-17 16:49:14 +00:00
parent 7e942285cf
commit 61e6f3c119
3 changed files with 15 additions and 8 deletions

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.20 2013/12/10 11:44:47 jperkin Exp $
# $NetBSD: Makefile,v 1.21 2014/02/17 16:49:14 jperkin Exp $
DISTNAME= g95_source
PKGNAME= g95-0.93
PKGREVISION= 4
PKGREVISION= 5
CATEGORIES= lang
MASTER_SITES= http://ftp.g95.org/v${PKGVERSION_NOREV}/
EXTRACT_SUFX= .tgz

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.18 2013/09/23 17:56:32 asau Exp $
$NetBSD: distinfo,v 1.19 2014/02/17 16:49:14 jperkin Exp $
SHA1 (g95_source.tgz) = b5e503fd6459b65cbda73190685f9490230d9cff
RMD160 (g95_source.tgz) = 98d03e9a1835f4b3553a72a798bdf1d90a757176
@ -30,4 +30,4 @@ SHA1 (patch-libf95.a-0.93_io_read.c) = 594bcfb15e59dcaaec5a6a21a58af17e8f41eae9
SHA1 (patch-libf95.a-0.93_math_ff.c) = 353121bc08a86765d18b0e6f051ba91f7e65e9c2
SHA1 (patch-libf95.a-0.93_math_x87.S) = d1eb02bd2358b6abb9b8dc3e32629cba540adcc4
SHA1 (patch-libf95.a-0.93_quad_power16.c) = fc7375aa90ecf75bb8ba26d41739614040b16e09
SHA1 (patch-libf95.a-0.93_runtime_main.c) = a993a28e0c766c1ae0c73c5bda91b1446d6d944d
SHA1 (patch-libf95.a-0.93_runtime_main.c) = dfde68072f38bf5bbb9c54ebeea5b9ce07d0c6be

View file

@ -1,11 +1,11 @@
$NetBSD: patch-libf95.a-0.93_runtime_main.c,v 1.2 2013/09/20 23:06:07 joerg Exp $
$NetBSD: patch-libf95.a-0.93_runtime_main.c,v 1.3 2014/02/17 16:49:14 jperkin Exp $
* fixes missing restore stack address. PR pkg/47906
* Make MAIN_ weak to allow linking libf95 dynamically.
--- libf95.a-0.93/runtime/main.c.orig 2010-04-18 15:47:28.000000000 +0000
+++ libf95.a-0.93/runtime/main.c
@@ -37,11 +37,12 @@
@@ -37,11 +37,14 @@
void __main(void) {}
#endif
@ -14,7 +14,9 @@ $NetBSD: patch-libf95.a-0.93_runtime_main.c,v 1.2 2013/09/20 23:06:07 joerg Exp
-
/* main()-- Entry point for the fortran program */
-void MAIN_(void);
+#if __GNUC__ - 0 == 4 && __GNUC_MINOR__ < 2
+#ifdef __APPLE__
+void MAIN_(void);
+#elif __GNUC__ - 0 == 4 && __GNUC_MINOR__ < 2
+extern void weak_MAIN_(void) __attribute__((__weakref__("MAIN_")));
+#else
+static void weak_MAIN_(void) __attribute__((__weakref__("MAIN_")));
@ -22,7 +24,7 @@ $NetBSD: patch-libf95.a-0.93_runtime_main.c,v 1.2 2013/09/20 23:06:07 joerg Exp
int main(int argc, char *argv[]) {
@@ -50,17 +51,25 @@ int main(int argc, char *argv[]) {
@@ -50,17 +53,30 @@ int main(int argc, char *argv[]) {
* unaligned. */
#if HAVE_REAL_10 == 1 || HAVE_REAL_10 == 2
@ -37,8 +39,13 @@ $NetBSD: patch-libf95.a-0.93_runtime_main.c,v 1.2 2013/09/20 23:06:07 joerg Exp
g95_runtime_start(argc, argv);
- MAIN_(); /* Call the Fortran main program. */
+#ifdef __APPLE__
+ if (MAIN_)
+ MAIN_(); /* Call the Fortran main program. */
+#else
+ if (weak_MAIN_)
+ weak_MAIN_(); /* Call the Fortran main program. */
+#endif
memory_done();
g95_runtime_stop();