[patch] don't build multilib libraries during bootstrap, and disable some libstdc++ features

2012-12-10 Thread Matthias Klose
During bootstrap some things are built which are not required for the bootstrap:

 - multilib libraries
 - libstdc++ debug library, when configured with --enable-libstdcxx-debug
 - libstdc++ precompiled header files

The attached patch disables building these during the bootstrap stages. The
additional dependencies on all-target-libgcc are necessary for multilib'd
builds, or else the configury bails out finding the wrong libgcc. I can't see a
way to add these dependencies for the multilib enabled build only.

Ok for the trunk?

  Matthias
	* Makefile.tpl (configure-stage[+id+]-[+prefix+][+module+]): Pass
	bootstrap_configure_flags.
	* Makefile.def (target_modules): Pass bootstrap_configure_flags
	for libgcc, libgomp, libstdc++-v3.
	(dependencies): For all target libraries, depend on all-target-libgcc.
	
--- Makefile.tpl~	2012-11-29 17:44:18.0 +0100
+++ Makefile.tpl	2012-12-10 12:03:00.716683469 +0100
@@ -1060,7 +1060,9 @@
 	  --target=[+target_alias+] $${srcdiroption} [+ IF prev +]\
 	  --with-build-libsubdir=$(HOST_SUBDIR) [+ ENDIF prev +]\
 	  $(STAGE[+id+]_CONFIGURE_FLAGS)[+ IF extra_configure_flags +] \
-	  [+extra_configure_flags+][+ ENDIF extra_configure_flags +]
+	  [+extra_configure_flags+][+ ENDIF extra_configure_flags +] \
+	  [+ IF bootstrap_configure_flags +][+bootstrap_configure_flags+] \
+	  [+ ENDIF bootstrap_configure_flags +]
 @endif [+prefix+][+module+]-bootstrap
 [+ ENDFOR bootstrap_stage +]
 [+ ENDIF bootstrap +]
--- Makefile.def~	2012-12-01 22:34:06.0 +0100
+++ Makefile.def	2012-12-10 12:51:08.444647333 +0100
@@ -117,12 +117,14 @@
 target_modules = { module= libstdc++-v3;
 		   bootstrap=true;
 		   lib_path=src/.libs;
-		   raw_cxx=true; };
+		   raw_cxx=true;
+		   bootstrap_configure_flags='--disable-multilib --disable-libstdcxx-debug --disable-libstdcxx-pch'; };
 target_modules = { module= libmudflap; lib_path=.libs; };
 target_modules = { module= libsanitizer; lib_path=.libs; };
 target_modules = { module= libssp; lib_path=.libs; };
 target_modules = { module= newlib; };
-target_modules = { module= libgcc; bootstrap=true; no_check=true; };
+target_modules = { module= libgcc; bootstrap=true; no_check=true;
+	   	   bootstrap_configure_flags='--disable-multilib'; };
 target_modules = { module= libbacktrace; };
 target_modules = { module= libquadmath; };
 target_modules = { module= libgfortran; };
@@ -142,7 +144,8 @@
 target_modules = { module= boehm-gc; };
 target_modules = { module= rda; };
 target_modules = { module= libada; };
-target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
+target_modules = { module= libgomp; bootstrap= true; lib_path=.libs;
+	   	   bootstrap_configure_flags='--disable-multilib'; };
 target_modules = { module= libitm; lib_path=.libs; };
 target_modules = { module= libatomic; lib_path=.libs; };
 
@@ -504,6 +507,19 @@
 dependencies = { module=configure-target-libobjc; on=configure-target-boehm-gc; };
 dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; };
 dependencies = { module=configure-target-libstdc++-v3; on=configure-target-libgomp; };
+dependencies = { module=configure-target-libada; on=all-target-libgcc; };
+dependencies = { module=configure-target-libatomic; on=all-target-libgcc; };
+dependencies = { module=configure-target-libbacktrace; on=all-target-libgcc; };
+dependencies = { module=configure-target-libdecnumber; on=all-target-libgcc; };
+dependencies = { module=configure-target-libffi; on=all-target-libgcc; };
+dependencies = { module=configure-target-libgfortran; on=all-target-libgcc; };
+dependencies = { module=configure-target-libgomp; on=all-target-libgcc; };
+dependencies = { module=configure-target-libitm; on=all-target-libgcc; };
+dependencies = { module=configure-target-libmudflap; on=all-target-libgcc; };
+dependencies = { module=configure-target-libquadmath; on=all-target-libgcc; };
+dependencies = { module=configure-target-libssp; on=all-target-libgcc; };
+dependencies = { module=configure-target-libstdc++-v3; on=all-target-libgcc; };
+dependencies = { module=configure-target-zlib; on=all-target-libgcc; };
 dependencies = { module=configure-target-libsanitizer; on=all-target-libstdc++-v3; };
 // parallel_list.o and parallel_settings.o depend on omp.h, which is
 // generated by the libgomp configure.  Unfortunately, due to the use of


Re: [patch] don't build multilib libraries during bootstrap, and disable some libstdc++ features

2012-12-10 Thread Andrew Pinski
On Mon, Dec 10, 2012 at 4:16 AM, Matthias Klose  wrote:
> During bootstrap some things are built which are not required for the 
> bootstrap:
>
>  - multilib libraries
>  - libstdc++ debug library, when configured with --enable-libstdcxx-debug
>  - libstdc++ precompiled header files
>
> The attached patch disables building these during the bootstrap stages. The
> additional dependencies on all-target-libgcc are necessary for multilib'd
> builds, or else the configury bails out finding the wrong libgcc. I can't see 
> a
> way to add these dependencies for the multilib enabled build only.
>
> Ok for the trunk?

Does this work when someone supplies BOOT_CFLAGS a multlib option like
say -m32 ?

Thanks,
Andrew Pinski


Re: [patch] don't build multilib libraries during bootstrap, and disable some libstdc++ features

2012-12-10 Thread Richard Biener
On Mon, Dec 10, 2012 at 1:18 PM, Andrew Pinski  wrote:
> On Mon, Dec 10, 2012 at 4:16 AM, Matthias Klose  wrote:
>> During bootstrap some things are built which are not required for the 
>> bootstrap:
>>
>>  - multilib libraries
>>  - libstdc++ debug library, when configured with --enable-libstdcxx-debug
>>  - libstdc++ precompiled header files
>>
>> The attached patch disables building these during the bootstrap stages. The
>> additional dependencies on all-target-libgcc are necessary for multilib'd
>> builds, or else the configury bails out finding the wrong libgcc. I can't 
>> see a
>> way to add these dependencies for the multilib enabled build only.
>>
>> Ok for the trunk?
>
> Does this work when someone supplies BOOT_CFLAGS a multlib option like
> say -m32 ?

I don't think that was ever supported without adjusting the target/host triplet
to i686-linux for example.  Was it?

Richard.

> Thanks,
> Andrew Pinski


Re: [patch] don't build multilib libraries during bootstrap, and disable some libstdc++ features

2012-12-10 Thread Matthias Klose
Am 10.12.2012 13:16, schrieb Matthias Klose:
> During bootstrap some things are built which are not required for the 
> bootstrap:
> 
>  - multilib libraries
>  - libstdc++ debug library, when configured with --enable-libstdcxx-debug
>  - libstdc++ precompiled header files
> 
> The attached patch disables building these during the bootstrap stages. The
> additional dependencies on all-target-libgcc are necessary for multilib'd
> builds, or else the configury bails out finding the wrong libgcc. I can't see 
> a
> way to add these dependencies for the multilib enabled build only.

Here is a reduced version which keeps building the multilibs, maybe better
suited for stage3.

  Matthias


Index: Makefile.tpl
===
--- Makefile.tpl	(Revision 194357)
+++ Makefile.tpl	(Arbeitskopie)
@@ -1060,7 +1060,9 @@
 	  --target=[+target_alias+] $${srcdiroption} [+ IF prev +]\
 	  --with-build-libsubdir=$(HOST_SUBDIR) [+ ENDIF prev +]\
 	  $(STAGE[+id+]_CONFIGURE_FLAGS)[+ IF extra_configure_flags +] \
-	  [+extra_configure_flags+][+ ENDIF extra_configure_flags +]
+	  [+extra_configure_flags+][+ ENDIF extra_configure_flags +] \
+	  [+ IF bootstrap_configure_flags +][+bootstrap_configure_flags+] \
+	  [+ ENDIF bootstrap_configure_flags +]
 @endif [+prefix+][+module+]-bootstrap
 [+ ENDFOR bootstrap_stage +]
 [+ ENDIF bootstrap +]
Index: Makefile.def
===
--- Makefile.def	(Revision 194357)
+++ Makefile.def	(Arbeitskopie)
@@ -117,7 +117,8 @@
 target_modules = { module= libstdc++-v3;
 		   bootstrap=true;
 		   lib_path=src/.libs;
-		   raw_cxx=true; };
+		   raw_cxx=true;
+		   bootstrap_configure_flags='--disable-libstdcxx-debug --disable-libstdcxx-pch'; };
 target_modules = { module= libmudflap; lib_path=.libs; };
 target_modules = { module= libsanitizer; lib_path=.libs; };
 target_modules = { module= libssp; lib_path=.libs; };


Re: [patch] don't build multilib libraries during bootstrap, and disable some libstdc++ features

2012-12-10 Thread H.J. Lu
On Mon, Dec 10, 2012 at 5:53 AM, Matthias Klose  wrote:
> Am 10.12.2012 13:16, schrieb Matthias Klose:
>> During bootstrap some things are built which are not required for the 
>> bootstrap:
>>
>>  - multilib libraries
>>  - libstdc++ debug library, when configured with --enable-libstdcxx-debug
>>  - libstdc++ precompiled header files
>>
>> The attached patch disables building these during the bootstrap stages. The
>> additional dependencies on all-target-libgcc are necessary for multilib'd
>> builds, or else the configury bails out finding the wrong libgcc. I can't 
>> see a
>> way to add these dependencies for the multilib enabled build only.
>
> Here is a reduced version which keeps building the multilibs, maybe better
> suited for stage3.
>

Can I still use -m32 with stage1 and stage2 compilers on
Linux/x86-64?


-- 
H.J.