|
0 |
Description: Use host compiler and linker instead of build compiler
|
|
1 |
Author: Nilesh Patra <nilesh@debian.org>
|
|
2 |
Last-Update: 2021-06-01
|
|
3 |
--- a/acelib/Makefile
|
|
4 |
+++ b/acelib/Makefile
|
|
5 |
@@ -2,6 +2,7 @@
|
|
6 |
false = 0
|
|
7 |
RANLIB_NEEDED = true # default overridable in $(ACEDB_MACHINE)_DEF
|
|
8 |
AR_OPTIONS = rlu # default overridable in $(ACEDB_MACHINE)_DEF
|
|
9 |
+AR = ar
|
|
10 |
|
|
11 |
RPCGEN_FLAGS = -I -K -1
|
|
12 |
# -I -K -1 good for alpha
|
|
13 |
@@ -42,7 +43,7 @@
|
|
14 |
## Different platforms use CC or COMPILE.c
|
|
15 |
# (USEROPTS - see comments at top of file)
|
|
16 |
#
|
|
17 |
-CC = $(COMPILER) $(CFLAGS) $(CPPFLAGS) $(USEROPTS) $(IDIR) -D$(NAME) -c
|
|
18 |
+CC_compile = $(COMPILER) $(CFLAGS) $(CPPFLAGS) $(USEROPTS) $(IDIR) -D$(NAME) -c
|
|
19 |
COMPILE.c = $(COMPILER) $(CFLAGS) $(CPPFLAGS) $(USEROPTS) $(IDIR) -D$(NAME) -c
|
|
20 |
|
|
21 |
###########################################################
|
|
22 |
@@ -63,11 +64,11 @@
|
|
23 |
################## libraries #########################
|
|
24 |
|
|
25 |
libaceperl.a : $(FREE_OBJS) aceclientlib.o rpcace_clnt.o rpcace_xdr.o
|
|
26 |
- ar $(AR_OPTIONS) $@ $?
|
|
27 |
+ $(AR) $(AR_OPTIONS) $@ $?
|
|
28 |
if ( $(RANLIB_NEEDED) ) then ranlib $@; fi
|
|
29 |
|
|
30 |
libfree.a : $(FREE_OBJS)
|
|
31 |
- ar $(AR_OPTIONS) libfree.a $?
|
|
32 |
+ $(AR) $(AR_OPTIONS) libfree.a $?
|
|
33 |
if ( $(RANLIB_NEEDED) ) then ranlib libfree.a; fi
|
|
34 |
|
|
35 |
#########################################
|
|
36 |
@@ -87,7 +88,7 @@
|
|
37 |
LIBACE_OBJS = $(GENERIC_ACE_OBJS) $(GENERIC_ACE_NONGRAPH_OBJS) aceversion.o
|
|
38 |
|
|
39 |
libace.a : $(LIBACE_OBJS)
|
|
40 |
- ar $(AR_OPTIONS) libace.a $?
|
|
41 |
+ $(AR) $(AR_OPTIONS) libace.a $?
|
|
42 |
if ( $(RANLIB_NEEDED) ) then ranlib libace.a; fi
|
|
43 |
|
|
44 |
######################################################
|
|
45 |
@@ -106,7 +107,7 @@
|
|
46 |
rpcace_sp.o: rpcace_sp.c rpcace_svc.c
|
|
47 |
|
|
48 |
aceclientlib.o: aceclientlib.c rpcace.h
|
|
49 |
- $(CC) $(LDFLAGS) -c $<
|
|
50 |
+ $(CC_compile) $(LDFLAGS) -c $<
|
|
51 |
|
|
52 |
RPC_CLIENT_OBJS = aceclientlib.o rpcace_clnt.o rpcace_xdr.o
|
|
53 |
RPC_SERVER_OBJS = rpcace_sp.o rpcace_xdr.o
|
|
54 |
@@ -114,7 +115,7 @@
|
|
55 |
RPC_X_CLIENT_OBJS = xclient.o aceclientlib.o rpcace_clnt.o rpcace_xdr.o
|
|
56 |
|
|
57 |
libacecl.a : aceclientlib.o rpcace_clnt.o rpcace_xdr.o
|
|
58 |
- ar $(AR_OPTIONS) libacecl.a $?
|
|
59 |
+ $(AR) $(AR_OPTIONS) libacecl.a $?
|
|
60 |
if ( $(RANLIB_NEEDED) ) then ranlib libacecl.a; fi
|
|
61 |
|
|
62 |
###########################################################
|
|
63 |
--- a/acelib/wmake/LINUX_DEF
|
|
64 |
+++ b/acelib/wmake/LINUX_DEF
|
|
65 |
@@ -15,9 +15,10 @@
|
|
66 |
##### following the explanations given in wmake/truemake #####
|
|
67 |
#################################################################
|
|
68 |
|
|
69 |
+CC = gcc
|
|
70 |
NAME = LINUX
|
|
71 |
-COMPILER = gcc -g -Wall -O2 -DACEDB4
|
|
72 |
-LINKER = gcc -g
|
|
73 |
+COMPILER = $(CC) -g -Wall -O2 -DACEDB4
|
|
74 |
+LINKER = $(CC) -g
|
|
75 |
USEROPTS=-fPIC
|
|
76 |
|
|
77 |
LIBS = -lm
|