diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-09-17 02:10:15 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:38:13 -0500 |
commit | 7f08aa1dd516dfe0e8a79575ed736e1e09a10f9d (patch) | |
tree | 2d424c7bd5576cf06162cefdedf3ce5dca3b84f5 /source4 | |
parent | f3bce652c8c33712ffbb6c0a731f61b05f9d4be0 (diff) | |
download | samba-7f08aa1dd516dfe0e8a79575ed736e1e09a10f9d.tar.gz samba-7f08aa1dd516dfe0e8a79575ed736e1e09a10f9d.tar.bz2 samba-7f08aa1dd516dfe0e8a79575ed736e1e09a10f9d.zip |
r10287: Compile compilers for build host. This fixes some bits of
the mingw32 build (it now fails on missing inet_aton / in_addr definitions).
Find sane default for HOSTCC
(This used to be commit 1a833690b8fd9a22169882c41704d24f2d52b2d9)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/m4/check_cc.m4 | 14 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 4 | ||||
-rw-r--r-- | source4/heimdal_build/config.mk | 87 |
3 files changed, 52 insertions, 53 deletions
diff --git a/source4/build/m4/check_cc.m4 b/source4/build/m4/check_cc.m4 index 8bc160eb82..aa6c8752ed 100644 --- a/source4/build/m4/check_cc.m4 +++ b/source4/build/m4/check_cc.m4 @@ -29,9 +29,9 @@ AC_ISC_POSIX dnl Check if C compiler understands -c and -o at the same time AC_PROG_CC_C_O if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then - BROKEN_CC=no -else BROKEN_CC=yes +else + BROKEN_CC=no fi AC_SUBST(BROKEN_CC) @@ -152,7 +152,15 @@ if test -n "$DEVELOPER_CFLAGS"; then fi # allow for --with-hostcc=gcc -AC_ARG_WITH(hostcc,[ --with-hostcc=compiler choose host compiler],[HOSTCC=$withval],[HOSTCC=$CC]) +AC_ARG_WITH(hostcc,[ --with-hostcc=compiler choose host compiler], +[HOSTCC=$withval], +[ +if test z"$cross_compiling" = "yes"; then + HOSTCC=cc +else + HOSTCC=$CC +fi +]) AC_SUBST(HOSTCC) AC_PATH_PROG(GCOV,gcov) diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 9215dee3a6..f0c17b693e 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -249,7 +249,7 @@ sub _prepare_std_CC_rule($$$$$) \@\$(CC) `script/cflags.sh \$\@` \$(CFLAGS) $flags -c \$< -o \$\@ __EOD__ if ($config{BROKEN_CC} eq "yes") { - $ret.= ' -mv `echo \$\@ | sed \'s%^.*/%%g\'` \$\@ + $ret.= ' -mv `echo $@ | sed \'s%^.*/%%g\'` $@ '; } return $ret."\n"; @@ -263,7 +263,7 @@ sub _prepare_hostcc_rule() \@\$(HOSTCC) `script/cflags.sh \$\@` \$(CFLAGS) -c \$< -o \$\@ __EOD__ if ($config{BROKEN_CC} eq "yes") { - $ret .= ' -mv `echo \$\@ | sed \'s%^.*/%%g\'` \$\@ + $ret .= ' -mv `echo $@ | sed \'s%^.*/%%g\' -e \'s%\.ho$$%.o%\'` $@ '; } diff --git a/source4/heimdal_build/config.mk b/source4/heimdal_build/config.mk index 1e34857522..59a0b919f7 100644 --- a/source4/heimdal_build/config.mk +++ b/source4/heimdal_build/config.mk @@ -356,62 +356,53 @@ NOPROTO = YES ####################### ####################### -# Start SUBSYSTEM ASN1_COMPILER -[SUBSYSTEM::ASN1_COMPILER] -ADD_OBJ_FILES = \ - heimdal/lib/asn1/main.o \ - heimdal/lib/asn1/gen.o \ - heimdal/lib/asn1/gen_copy.o \ - heimdal/lib/asn1/gen_decode.o \ - heimdal/lib/asn1/gen_encode.o \ - heimdal/lib/asn1/gen_free.o \ - heimdal/lib/asn1/gen_glue.o \ - heimdal/lib/asn1/gen_length.o \ - heimdal/lib/asn1/hash.o \ - heimdal/lib/asn1/lex.o \ - heimdal/lib/asn1/parse.o \ - heimdal/lib/roken/emalloc.o \ - heimdal/lib/roken/getarg.o \ - heimdal/lib/roken/setprogname.o \ - heimdal/lib/roken/strupr.o \ - heimdal/lib/roken/getprogname.o \ - heimdal/lib/roken/get_window_size.o \ - heimdal/lib/roken/estrdup.o \ - heimdal/lib/roken/ecalloc.o \ - heimdal/lib/asn1/symbol.o \ - heimdal_build/replace.o -NOPROTO = YES -# End SUBSYSTEM ASN1_COMPILER -####################### - -####################### # Start BINARY asn1_compile [BINARY::asn1_compile] -REQUIRED_SUBSYSTEMS = ASN1_COMPILER LIBREPLACE HEIMDAL_VERS -# End BINARY asn1_compile -####################### - -####################### -# Start SUBSYSTEM COMPILE_ET -[SUBSYSTEM::COMPILE_ET] -ADD_OBJ_FILES = \ - heimdal/lib/com_err/lex.o \ - heimdal/lib/com_err/parse.o \ - heimdal/lib/com_err/compile_et.o \ - heimdal/lib/roken/getarg.o \ - heimdal/lib/roken/get_window_size.o \ - heimdal/lib/roken/getprogname.o \ - heimdal/lib/roken/strupr.o \ - heimdal/lib/roken/setprogname.o \ - heimdal_build/replace.o NOPROTO = YES -# End SUBSYSTEM COMPILE_ET +OBJ_FILES = \ + heimdal/lib/asn1/main.ho \ + heimdal/lib/asn1/gen.ho \ + heimdal/lib/asn1/gen_copy.ho \ + heimdal/lib/asn1/gen_decode.ho \ + heimdal/lib/asn1/gen_encode.ho \ + heimdal/lib/asn1/gen_free.ho \ + heimdal/lib/asn1/gen_glue.ho \ + heimdal/lib/asn1/gen_length.ho \ + heimdal/lib/asn1/hash.ho \ + heimdal/lib/asn1/lex.ho \ + heimdal/lib/asn1/parse.ho \ + heimdal/lib/roken/emalloc.ho \ + heimdal/lib/roken/getarg.ho \ + heimdal/lib/roken/setprogname.ho \ + heimdal/lib/roken/strupr.ho \ + heimdal/lib/roken/getprogname.ho \ + heimdal/lib/roken/get_window_size.ho \ + heimdal/lib/roken/estrdup.ho \ + heimdal/lib/roken/ecalloc.ho \ + heimdal/lib/asn1/symbol.ho \ + heimdal_build/replace.ho \ + heimdal/lib/vers/print_version.ho \ + lib/replace/snprintf.ho \ + lib/replace/replace.ho +# End BINARY asn1_compile ####################### ####################### # Start BINARY compile_et [BINARY::compile_et] -REQUIRED_SUBSYSTEMS = COMPILE_ET LIBREPLACE HEIMDAL_VERS +NOPROTO = YES +OBJ_FILES = heimdal/lib/vers/print_version.ho \ + heimdal/lib/com_err/lex.ho \ + heimdal/lib/com_err/parse.ho \ + heimdal/lib/com_err/compile_et.ho \ + heimdal/lib/roken/getarg.ho \ + heimdal/lib/roken/get_window_size.ho \ + heimdal/lib/roken/getprogname.ho \ + heimdal/lib/roken/strupr.ho \ + heimdal/lib/roken/setprogname.ho \ + heimdal_build/replace.ho \ + lib/replace/snprintf.ho \ + lib/replace/replace.ho # End BINARY compile_et ####################### |