[PATCH] Allow custom flags passed to target-lib builds
Richard Guenther
rguenther@suse.de
Thu Nov 24 13:50:00 GMT 2005
This patch allows to override f.i. toolexeclibdir for libgfortran build,
so a special libgfortran can be built and installed from the packaging
machinery like
make clean-target-libgfortran
make all-target-libgfortran CFLAGS="-march=pentiumpro -msse2 -mfpmath=sse,387" FFLAGS="-msse2 -mfpmath=sse,387"
make install-target-libgfortran USER_TARGET_FLAGS='toolexeclibdir=\$(libdir)/i686/sse2'
which is not possible right now (ok, it is, but not without a lot of
pain).
Now simply USER_TAGET_FLAGS is appended to the TARGET_FLAGS_TO_PASS flags.
Ok for mainline and maybe 4.1?
Thanks,
Richard.
:ADDPATCH toplevel:
2005-11-24 Richard Guenther <rguenther@suse.de>
* Makefile.tpl (TARGET_FLAGS_TO_PASS): Add $(USER_TARGET_FLAGS).
* Makefile.in: Regenerated.
Index: Makefile.in
===================================================================
--- Makefile.in (revision 107414)
+++ Makefile.in (working copy)
@@ -750,7 +750,8 @@ EXTRA_TARGET_FLAGS = \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)'
-TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
+TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(USER_TARGET_FLAGS)
# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
# unfortunately needs the native compiler and the target ar and
Index: Makefile.tpl
===================================================================
--- Makefile.tpl (revision 107414)
+++ Makefile.tpl (working copy)
@@ -682,7 +682,8 @@ EXTRA_TARGET_FLAGS = \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)'
-TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
+TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(USER_TARGET_FLAGS)
# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
# unfortunately needs the native compiler and the target ar and
More information about the Gcc-patches
mailing list