summaryrefslogtreecommitdiff
path: root/dev-lang/gforth/files/gforth-0.7.3-CFLAGS-LDFLAGS.patch
blob: 55041f43564666b54ac19c922add73acce766cb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
https://bugs.gentoo.org/723072
--- a/libcc.fs
+++ b/libcc.fs
@@ -562,7 +562,10 @@ DEFER compile-wrapper-function ( -- )
 	0 c-source-file-id !
 	[ libtool-command s"  --silent --tag=CC --mode=compile " s+
 	  libtool-cc append s"  -I " append
-	  s" includedir" getenv append ] sliteral
+	  s" includedir" getenv append
+	  s" CFLAGS" getenv append
+	  s" LDFLAGS" getenv append
+	] sliteral
 	s"  -O -c " s+ lib-filename 2@ append s" .c -o " append
 	lib-filename 2@ append s" .lo" append ( c-addr u )
 	\    2dup type cr
@@ -571,7 +571,10 @@ DEFER compile-wrapper-function ( -- )
 	\    2dup type cr
 	2dup system drop free throw $? abort" libtool compile failed"
 	[ libtool-command s"  --silent --tag=CC --mode=link " s+
-	  libtool-cc append libtool-flags append s"  -module -rpath " s+ ] sliteral
+	  libtool-cc append
+	  s" CFLAGS" getenv append
+	  s" LDFLAGS" getenv append
+	  libtool-flags append s"  -module -rpath " s+ ] sliteral
 	lib-filename 2@ dirname replace-rpath s+ s"  " append
 	lib-filename 2@ append s" .lo -o " append
 	lib-filename 2@ append s" .la" append ( c-addr u )