Patchwork don't build multilib libraries during bootstrap, and disable some libstdc++ features

login
register
mail settings
Submitter Matthias Klose
Date Dec. 10, 2012, 12:16 p.m.
Message ID <50C5D288.8010000@ubuntu.com>
Download mbox | patch
Permalink /patch/204860/
State New
Headers show

Comments

Matthias Klose - Dec. 10, 2012, 12:16 p.m.
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
Andrew Pinski - Dec. 10, 2012, 12:18 p.m.
On Mon, Dec 10, 2012 at 4:16 AM, Matthias Klose <doko@ubuntu.com> 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
Richard Guenther - Dec. 10, 2012, 12:32 p.m.
On Mon, Dec 10, 2012 at 1:18 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Mon, Dec 10, 2012 at 4:16 AM, Matthias Klose <doko@ubuntu.com> 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

Patch

	* 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.000000000 +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.000000000 +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