File: Correct-mklib-calls-to-fix-FTCFBFS.patch

package info (click to toggle)
funtools 1.4.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,004 kB
  • sloc: ansic: 89,502; sh: 10,714; lex: 4,613; asm: 3,281; ada: 1,681; makefile: 1,468; pascal: 1,089; cpp: 1,001; cs: 879; perl: 161; python: 119; yacc: 64; sed: 38; csh: 10; tcl: 9
file content (51 lines) | stat: -rw-r--r-- 2,059 bytes parent folder | download | duplicates (3)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From: Helmut Grohne <helmut@subdivi.de>
Date: Fri, 23 Nov 2018 20:30:39 +0100
Subject: Correct mklib calls to fix FTCFBFS

Closes: #914485

[...] The Makefile.in passes CC and CXX to mklib. However, mklib does not
inspect those variables. Passing them is completely useless. Rather it wants
the compiler as a -linker flag. The attached patch fixes that and thus makes
funtools cross buildable. It does not fix the error reporting in mklib. Please
consider applying it.

Helmut
---
 Makefile.in | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 2f41ae4..b310b3f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -232,8 +232,7 @@ funmainlib.c:	$(MAINLIBOBJS) mkfunmainlib
 shlib:		sublib $(LIBOBJS)
 		rm -rf $(PACKAGE)tmp; mkdir -p $(PACKAGE)tmp
 		(cd $(PACKAGE)tmp && ar x ../$(LIB))
-		CC='$(CC)' CXX=$(CXX) \
-		./mklib -o $(PACKAGE) -ldl $(WCS_LIBS) -lm -lz `LC_ALL=C ls $(PACKAGE)tmp/*.o`
+		./mklib -linker $(CC) -o $(PACKAGE) -ldl $(WCS_LIBS) -lm -lz `LC_ALL=C ls $(PACKAGE)tmp/*.o`
 		rm -rf $(PACKAGE)tmp
 
 mainlib:	$(MAINLIBOBJS) funmainlib.o lex.calc.o
@@ -244,8 +243,7 @@ mainlib:	$(MAINLIBOBJS) funmainlib.o lex.calc.o
 shmainlib:	mainlib
 		rm -rf $(PACKAGE)tmp; mkdir -p $(PACKAGE)tmp
 		(cd $(PACKAGE)tmp && ar x ../lib$(PACKAGE)MainLib.a)
-		CC='$(CC)' CXX='$(CXX)' \
-		./mklib -o $(PACKAGE)MainLib -L. -lfuntools `LC_ALL=C ls $(PACKAGE)tmp/*.o`
+		./mklib -linker $(CC) -o $(PACKAGE)MainLib -L. -lfuntools `LC_ALL=C ls $(PACKAGE)tmp/*.o`
 		rm -rf $(PACKAGE)tmp
 
 tclfun:		$(LIB) tclmainlib.o tclfun.o
@@ -255,8 +253,7 @@ tclfun:		$(LIB) tclmainlib.o tclfun.o
 shtclfun:	tclfun
 		rm -rf $(PACKAGE)tmp; mkdir -p $(PACKAGE)tmp
 		(cd $(PACKAGE)tmp && ar x ../libtclfun.a)
-		CC='$(CC)' CXX='$(CXX)' \
-		./mklib -o tclfun -L. -lfuntools `LC_ALL=C ls $(PACKAGE)tmp/*.o` $(TCL_LIBS)
+		./mklib -linker $(CC) -o tclfun -L. -lfuntools `LC_ALL=C ls $(PACKAGE)tmp/*.o` $(TCL_LIBS)
 		rm -rf $(PACKAGE)tmp
 		test -r pkgIndex.tcl && mv pkgIndex.tcl pkgIndex.tcl-old
 		SHLIB=libtclfun.so; \