svn commit: samba r14322 - in branches/SAMBA_4_0/source: . build/m4 build/smb_build param

jelmer at samba.org jelmer at samba.org
Mon Mar 13 15:19:14 GMT 2006


Author: jelmer
Date: 2006-03-13 15:19:14 +0000 (Mon, 13 Mar 2006)
New Revision: 14322

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14322

Log:
Remove the BROKEN_CC flag for now. None of the buildfarm hosts has 
a C compiler that doesn't support -c and -o together and it makes the build 
system more complicated. This also means the current handling of broken C 
compilers is most likely broken as it isn't tested.

This detection can be readded when we stumble upon a C compiler that supports
both C99 (or at least the parts of it we need) and also has broken -c/-o 
handling, which I think is unlikely to happen.

Modified:
   branches/SAMBA_4_0/source/build/m4/check_cc.m4
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SAMBA_4_0/source/main.mk
   branches/SAMBA_4_0/source/param/config.mk


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/check_cc.m4
===================================================================
--- branches/SAMBA_4_0/source/build/m4/check_cc.m4	2006-03-13 15:13:35 UTC (rev 14321)
+++ branches/SAMBA_4_0/source/build/m4/check_cc.m4	2006-03-13 15:19:14 UTC (rev 14322)
@@ -26,15 +26,6 @@
 dnl needed before AC_TRY_COMPILE
 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=yes
-else
-	BROKEN_CC=no
-fi
-AC_SUBST(BROKEN_CC)
-
 AC_CACHE_CHECK([that the C compiler can precompile header files],samba_cv_precompiled_headers, [
 	dnl Check whether the compiler can generate precompiled headers
 	touch conftest.h

Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2006-03-13 15:13:35 UTC (rev 14321)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2006-03-13 15:19:14 UTC (rev 14322)
@@ -44,10 +44,6 @@
 
 	$self->_prepare_path_vars();
 	$self->_prepare_compiler_linker();
-	$self->output(".SUFFIXES: .x .c .et .y .l .d .o .h .h.gch .a .so .1 .1.xml .3 .3.xml .5 .5.xml .7 .7.xml .8 .8.xml .ho\n");
-	$self->_prepare_hostcc_rule();
-	$self->_prepare_std_CC_rule("c","o",'$(PICFLAG)',"Compiling","Rule for std objectfiles");
-	$self->_prepare_std_CC_rule("h","h.gch",'$(PICFLAG)',"Precompiling","Rule for precompiled headerfiles");
 
 	return $self;
 }
@@ -167,60 +163,6 @@
 	$self->output("MK_FILES = " . array2oneperline(\@tmp) . "\n");
 }
 
-sub _prepare_dummy_MAKEDIR($)
-{
-	my ($self) = @_;
-
-	$self->output(<< '__EOD__'
-dynconfig.o: dynconfig.c Makefile
-	@echo Compiling $*.c
-	@$(CC) $(CFLAGS) $(PICFLAG) $(PATH_FLAGS) -c $< -o $@
-__EOD__
-);
-	if ($self->{config}->{BROKEN_CC} eq "yes") {
-		$self->output('	-mv `echo $@ | sed \'s%^.*/%%g\'` $@
-');
-	}
-	$self->output("\n");
-}
-
-sub _prepare_std_CC_rule($$$$$$)
-{
-	my ($self,$src,$dst,$flags,$message,$comment) = @_;
-
-	$self->output(<< "__EOD__"
-# $comment
-.$src.$dst:
-	\@echo $message \$\*.$src
-	\@\$(CC) `script/cflags.pl \$\@` \$(CFLAGS) $flags -c \$\*.$src -o \$\@
-__EOD__
-);
-	if ($self->{config}->{BROKEN_CC} eq "yes") {
-		$self->output('	-mv `echo $@ | sed \'s%^.*/%%g\'` $@
-');
-	}
-
-	$self->output("\n");
-}
-
-sub _prepare_hostcc_rule($)
-{
-	my ($self) = @_;
-	
-	$self->output(<< "__EOD__"
-.c.ho:
-	\@echo Compiling \$\*.c with host compiler
-	\@\$(HOSTCC) `script/cflags.pl \$\@` \$(CFLAGS) -c \$\*.c -o \$\@
-__EOD__
-);
-	if ($self->{config}->{BROKEN_CC} eq "yes") {
-		$self->output('	-mv `echo $@ | sed \'s%^.*/%%g\' -e \'s%\.ho$$%.o%\'` $@
-');
-	}
-
-	$self->output("\n");
-}
-
 sub array2oneperline($)
 {
 	my $array = shift;
@@ -604,8 +546,6 @@
 );
 	}
 
-	$self->_prepare_dummy_MAKEDIR();
-
 	$self->output($self->{mkfile});
 
 	open(MAKEFILE,">$file") || die ("Can't open $file\n");

Modified: branches/SAMBA_4_0/source/main.mk
===================================================================
--- branches/SAMBA_4_0/source/main.mk	2006-03-13 15:13:35 UTC (rev 14321)
+++ branches/SAMBA_4_0/source/main.mk	2006-03-13 15:19:14 UTC (rev 14322)
@@ -333,10 +333,24 @@
 # File types
 ###############################################################################
 
+.SUFFIXES: .x .c .et .y .l .d .o .h .h.gch .a .so .1 .1.xml .3 .3.xml .5 .5.xml .7 .7.xml .8 .8.xml .ho
+
+.c.ho:
+	@echo Compiling $*.c with host compiler
+	@$(HOSTCC) `script/cflags.pl $@` $(CFLAGS) -c $*.c -o $@
+
 .c.d:
 	@echo "Generating dependencies for $<"
 	@$(CC) -MM -MG -MT $(<:.c=.o) -MF $@ $(CFLAGS) $<
 
+.c.o:
+	@echo Compiling $<
+	@$(CC) `script/cflags.pl $@` $(CFLAGS) $(PICFLAG) -c $< -o $@
+
+.h.h.gch:
+	@echo Precompiling $<
+	@$(CC) `script/cflags.pl $@` $(CFLAGS) $(PICFLAG) -c $< -o $@
+
 .y.c:
 	@echo "Building $< with $(YACC)"
 	@-$(srcdir)/script/yacc_compile.sh "$(YACC)" "$<" "$@"

Modified: branches/SAMBA_4_0/source/param/config.mk
===================================================================
--- branches/SAMBA_4_0/source/param/config.mk	2006-03-13 15:13:35 UTC (rev 14321)
+++ branches/SAMBA_4_0/source/param/config.mk	2006-03-13 15:19:14 UTC (rev 14322)
@@ -5,3 +5,7 @@
 				generic.o
 REQUIRED_SUBSYSTEMS = LIBBASIC 
 PRIVATE_PROTO_HEADER = param.h
+
+dynconfig.o: dynconfig.c Makefile
+	@echo Compiling $<
+	@$(CC) $(CFLAGS) $(PICFLAG) $(PATH_FLAGS) -c $< -o $@



More information about the samba-cvs mailing list