summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-11-07 12:54:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:25:16 -0500
commitead66ffddf215a697533880b1958bd2f2903572f (patch)
treeb1413abd09a4b35b51891448d7330b8a77e86249 /source4
parent14b00f10d9279b580c8bc6479b9e0402a74daf11 (diff)
downloadsamba-ead66ffddf215a697533880b1958bd2f2903572f.tar.gz
samba-ead66ffddf215a697533880b1958bd2f2903572f.tar.xz
samba-ead66ffddf215a697533880b1958bd2f2903572f.zip
r19618: pass -D_SAMBA_HOSTCC_ when using the hostcompiler
metze (This used to be commit 846553085e57bda44fda2a541bf00517d3586e8c)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/smb_build/makefile.pm2
-rw-r--r--source4/main.mk8
2 files changed, 6 insertions, 4 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 0158597f74..f763ccbc18 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -130,7 +130,9 @@ CPPFLAGS=$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -I\
CC=$self->{config}->{CC}
CFLAGS=$self->{config}->{CFLAGS} \$(CPPFLAGS)
PICFLAG=$self->{config}->{PICFLAG}
+
HOSTCC=$self->{config}->{HOSTCC}
+HOSTCC_CFLAGS=-D_SAMBA_HOSTCC_ $self->{config}->{CFLAGS} \$(CPPFLAGS)
INSTALL_LINK_FLAGS=-Wl,-rpath-link,\$(builddir)/bin/shared
diff --git a/source4/main.mk b/source4/main.mk
index da165c963e..235465ea50 100644
--- a/source4/main.mk
+++ b/source4/main.mk
@@ -341,7 +341,7 @@ unused_macros:
.c.hd:
@echo "Generating host-compiler dependencies for $<"
- @$(CC) -M -MG -MP -MT $(<:.c=.ho) -MT $@ `$(PERL) $(srcdir)/script/cflags.pl $@` $(CFLAGS) $< -o $@
+ @$(CC) -M -MG -MP -MT $(<:.c=.ho) -MT $@ `$(PERL) $(srcdir)/script/cflags.pl $@` $(HOSTCC_CFLAGS) $< -o $@
include/includes.d: include/includes.h
@echo "Generating dependencies for $<"
@@ -366,10 +366,10 @@ include/includes.d: include/includes.h
.c.ho:
@echo "Compiling $*.c with host compiler"
- @$(HOSTCC) `$(PERL) $(srcdir)/script/cflags.pl $@` $(CFLAGS) -c $*.c -o $@ && exit 0;\
+ @$(HOSTCC) `$(PERL) $(srcdir)/script/cflags.pl $@` $(HOSTCC_CFLAGS) -c $*.c -o $@ && exit 0;\
echo "The following command failed:" 1>&2;\
- echo "$(HOSTCC) `$(PERL) $(srcdir)/script/cflags.pl $@` $(CFLAGS) -c $*.c -o $@" 1>&2;\
- $(HOSTCC) `$(PERL) $(srcdir)/script/cflags.pl $@` $(CFLAGS) -c $*.c -o $@ >/dev/null 2>&1
+ echo "$(HOSTCC) `$(PERL) $(srcdir)/script/cflags.pl $@` $(HOSTCC_CFLAGS) -c $*.c -o $@" 1>&2;\
+ $(HOSTCC) `$(PERL) $(srcdir)/script/cflags.pl $@` $(HOSTCC_CFLAGS) -c $*.c -o $@ >/dev/null 2>&1
.h.h.gch:
@echo "Precompiling $<"