From b5569e5b56d66e48695486f889fce36a3b502e91 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 7 Jun 2022 12:14:47 +0200 Subject: configure: update list of preserved environment variables INSTALL and LIBTOOL are not used anymore, but OBJCFLAGS is new and was not listed. Signed-off-by: Paolo Bonzini --- configure | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 4b12a8094c..d41c7eddff 100755 --- a/configure +++ b/configure @@ -2722,13 +2722,12 @@ preserve_env CC preserve_env CFLAGS preserve_env CXX preserve_env CXXFLAGS -preserve_env INSTALL preserve_env LD preserve_env LDFLAGS preserve_env LD_LIBRARY_PATH -preserve_env LIBTOOL preserve_env MAKE preserve_env NM +preserve_env OBJCFLAGS preserve_env OBJCOPY preserve_env PATH preserve_env PKG_CONFIG -- cgit v1.2.3-55-g7522 From b9eae9efae4ba63af823f3c27d1bd421a4f4f092 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 29 Mar 2022 13:07:25 +0200 Subject: configure: cleanup -fno-pie detection Place it only inside the 'if test "$pie" = "no"' conditional. Since commit 43924d1e53 ("pc-bios/optionrom: detect -fno-pie", 2022-05-12), the PIE options are detected independently by pc-bios/optionrom/Makefile, and the CFLAGS_NOPIE/LDFLAGS_NOPIE variables are not used anymore. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- configure | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'configure') diff --git a/configure b/configure index d41c7eddff..9fba134746 100755 --- a/configure +++ b/configure @@ -1346,13 +1346,6 @@ static THREAD int tls_var; int main(void) { return tls_var; } EOF -# Check we support -fno-pie and -no-pie first; we will need the former for -# building ROMs, and both for everything if --disable-pie is passed. -if compile_prog "-Werror -fno-pie" "-no-pie"; then - CFLAGS_NOPIE="-fno-pie" - LDFLAGS_NOPIE="-no-pie" -fi - if test "$static" = "yes"; then if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE" "-static-pie"; then CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS" @@ -1365,8 +1358,10 @@ if test "$static" = "yes"; then pie="no" fi elif test "$pie" = "no"; then - CONFIGURE_CFLAGS="$CFLAGS_NOPIE $CONFIGURE_CFLAGS" - CONFIGURE_LDFLAGS="$LDFLAGS_NOPIE $CONFIGURE_LDFLAGS" + if compile_prog "-Werror -fno-pie" "-no-pie"; then + CONFIGURE_CFLAGS="-fno-pie $CONFIGURE_CFLAGS" + CONFIGURE_LDFLAGS="-no-pie $CONFIGURE_LDFLAGS" + fi elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS" CONFIGURE_LDFLAGS="-pie $CONFIGURE_LDFLAGS" -- cgit v1.2.3-55-g7522 From 76ca98b0f85222601bd449252ac71df19e0dab29 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 13 Apr 2022 15:22:01 +0200 Subject: build: include pc-bios/ part in the ROMS variable Include the full path in TARGET_DIR, so that messages from sub-Makefiles are clearer. Also, prepare for possibly building firmware outside pc-bios/ from the Makefile, Signed-off-by: Paolo Bonzini --- Makefile | 12 +++++------- configure | 6 +++--- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'configure') diff --git a/Makefile b/Makefile index 3c0d89057e..ec4445db9a 100644 --- a/Makefile +++ b/Makefile @@ -186,16 +186,14 @@ include $(SRC_PATH)/tests/Makefile.include all: recurse-all -ROM_DIRS = $(addprefix pc-bios/, $(ROMS)) -ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS))) -# Only keep -O and -g cflags -.PHONY: $(ROM_DIRS_RULES) -$(ROM_DIRS_RULES): +ROMS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROMS))) +.PHONY: $(ROMS_RULES) +$(ROMS_RULES): $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),) .PHONY: recurse-all recurse-clean -recurse-all: $(addsuffix /all, $(ROM_DIRS)) -recurse-clean: $(addsuffix /clean, $(ROM_DIRS)) +recurse-all: $(addsuffix /all, $(ROMS)) +recurse-clean: $(addsuffix /clean, $(ROMS)) ###################################################################### diff --git a/configure b/configure index 9fba134746..a4d61fe504 100755 --- a/configure +++ b/configure @@ -2236,7 +2236,7 @@ if test -n "$target_cc" && fi done if test -n "$ld_i386_emulation"; then - roms="optionrom" + roms="pc-bios/optionrom" config_mak=pc-bios/optionrom/config.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "TOPSRC_DIR=$source_path" >> $config_mak @@ -2247,7 +2247,7 @@ fi probe_target_compilers ppc ppc64 if test -n "$target_cc" && test "$softmmu" = yes; then - roms="$roms vof" + roms="$roms pc-bios/vof" config_mak=pc-bios/vof/config.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_DIR=$source_path/pc-bios/vof" >> $config_mak @@ -2266,7 +2266,7 @@ if test -n "$target_cc" && test "$softmmu" = yes; then echo "WARNING: Your compiler does not support the z900!" echo " The s390-ccw bios will only work with guest CPUs >= z10." fi - roms="$roms s390-ccw" + roms="$roms pc-bios/s390-ccw" config_mak=pc-bios/s390-ccw/config-host.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak -- cgit v1.2.3-55-g7522