File: cross.patch

package info (click to toggle)
libace-perl 1.92-12
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,012 kB
  • sloc: perl: 7,763; ansic: 7,420; makefile: 81
file content (78 lines) | stat: -rw-r--r-- 2,545 bytes parent folder | download | duplicates (2)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Description: Use host compiler and linker instead of build compiler
Author: Nilesh Patra <nilesh@debian.org>
Last-Update: 2021-06-01
--- a/acelib/Makefile
+++ b/acelib/Makefile
@@ -2,6 +2,7 @@
 false = 0
 RANLIB_NEEDED = true	# default overridable in $(ACEDB_MACHINE)_DEF
 AR_OPTIONS = rlu	# default overridable in $(ACEDB_MACHINE)_DEF
+AR = ar
 
 RPCGEN_FLAGS = -I -K -1
 # -I -K -1  good for alpha
@@ -42,7 +43,7 @@
 ## Different platforms use CC or COMPILE.c
 #  (USEROPTS - see comments at top of file)
 #
-CC =        $(COMPILER) $(CFLAGS) $(CPPFLAGS) $(USEROPTS) $(IDIR) -D$(NAME) -c
+CC_compile =        $(COMPILER) $(CFLAGS) $(CPPFLAGS) $(USEROPTS) $(IDIR) -D$(NAME) -c
 COMPILE.c = $(COMPILER) $(CFLAGS) $(CPPFLAGS) $(USEROPTS) $(IDIR) -D$(NAME) -c
 
 ###########################################################
@@ -63,11 +64,11 @@
 ################## libraries #########################
 
 libaceperl.a : $(FREE_OBJS) aceclientlib.o rpcace_clnt.o rpcace_xdr.o
-	ar $(AR_OPTIONS) $@ $?
+	$(AR) $(AR_OPTIONS) $@ $?
 	if ( $(RANLIB_NEEDED) ) then ranlib $@; fi
 
 libfree.a : $(FREE_OBJS)
-	ar $(AR_OPTIONS) libfree.a $?
+	$(AR) $(AR_OPTIONS) libfree.a $?
 	if ( $(RANLIB_NEEDED) ) then ranlib libfree.a; fi
 
 #########################################
@@ -87,7 +88,7 @@
 LIBACE_OBJS = $(GENERIC_ACE_OBJS) $(GENERIC_ACE_NONGRAPH_OBJS) aceversion.o
 
 libace.a :  $(LIBACE_OBJS)
-	ar $(AR_OPTIONS) libace.a $?
+	$(AR) $(AR_OPTIONS) libace.a $?
 	if ( $(RANLIB_NEEDED) ) then ranlib libace.a; fi
 
 ######################################################
@@ -106,7 +107,7 @@
 rpcace_sp.o: rpcace_sp.c rpcace_svc.c
 
 aceclientlib.o: aceclientlib.c rpcace.h
-	$(CC) $(LDFLAGS) -c $<
+	$(CC_compile) $(LDFLAGS) -c $<
 
 RPC_CLIENT_OBJS = aceclientlib.o rpcace_clnt.o rpcace_xdr.o
 RPC_SERVER_OBJS = rpcace_sp.o  rpcace_xdr.o 
@@ -114,7 +115,7 @@
 RPC_X_CLIENT_OBJS = xclient.o aceclientlib.o rpcace_clnt.o rpcace_xdr.o
 
 libacecl.a : aceclientlib.o rpcace_clnt.o rpcace_xdr.o
-	ar $(AR_OPTIONS) libacecl.a $?
+	$(AR) $(AR_OPTIONS) libacecl.a $?
 	if ( $(RANLIB_NEEDED) ) then ranlib libacecl.a; fi
 
 ###########################################################
--- a/acelib/wmake/LINUX_DEF
+++ b/acelib/wmake/LINUX_DEF
@@ -15,9 +15,10 @@
 #####   following the explanations given in wmake/truemake  #####
 #################################################################
 
+CC = gcc
 NAME = LINUX
-COMPILER = gcc -g -Wall -O2 -DACEDB4
-LINKER = gcc -g
+COMPILER = $(CC) -g -Wall -O2 -DACEDB4
+LINKER = $(CC) -g
 USEROPTS=-fPIC
 
 LIBS = -lm