Skip to contentSkip to conversation

config-host.mak: remove unused compiler-related lines

PATCH In review Paolo Bonzini 2 participants 3 messages Jul 6, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config-host.mak: remove unused compiler-related lines

Most of the build is not done via Makefiles, therefore the toolchain variables are mostly unused. They are still used by tests/tcg and pc-bios/roms, but most of them are not needed there.

---
 configure   | 10 ----------
 meson.build |  1 -
 2 files changed, 11 deletions(-)
configure +0 -10
index 0e487ae091..650d9c0735 100755
@@ -521,9 +521,6 @@ query_pkg_config() {
 pkg_config=query_pkg_config
 sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}"
 
-# If the user hasn't specified ARFLAGS, default to 'rv', just as make does.
-ARFLAGS="${ARFLAGS-rv}"
-
 # default flags for all hosts
 # We use -fwrapv to tell the compiler that we require a C dialect where
 # left shift of signed integers is well defined and has the expected
@@ -4917,19 +4914,12 @@ echo "HOST_CC=$host_cc" >> $config_host_mak
 if $iasl -h > /dev/null 2>&1; then
   echo "CONFIG_IASL=$iasl" >> $config_host_mak
 fi
-echo "CXX=$cxx" >> $config_host_mak
-echo "OBJCC=$objcc" >> $config_host_mak
 echo "AR=$ar" >> $config_host_mak
-echo "ARFLAGS=$ARFLAGS" >> $config_host_mak
 echo "AS=$as" >> $config_host_mak
 echo "CCAS=$ccas" >> $config_host_mak
 echo "CPP=$cpp" >> $config_host_mak
 echo "OBJCOPY=$objcopy" >> $config_host_mak
 echo "LD=$ld" >> $config_host_mak
-echo "RANLIB=$ranlib" >> $config_host_mak
-echo "NM=$nm" >> $config_host_mak
-echo "PKG_CONFIG=$pkg_config_exe" >> $config_host_mak
-echo "WINDRES=$windres" >> $config_host_mak
 echo "CFLAGS_NOPIE=$CFLAGS_NOPIE" >> $config_host_mak
 echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
 echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak
meson.build +0 -1
index 1651496800..63411c5402 100644
@@ -2760,7 +2760,6 @@ if targetos == 'windows'
     summary_info += {'Windows SDK':   config_host['WIN_SDK']}
   endif
 endif
-summary_info += {'ARFLAGS':           config_host['ARFLAGS']}
 summary_info += {'CFLAGS':            ' '.join(get_option('c_args')
                                                + ['-O' + get_option('optimization')]
                                                + (get_option('debug') ? ['-g'] : []))}
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 31 lines · Paolo Bonzini

Most of the build is not done via Makefiles, therefore the toolchain variables are mostly unused. They are still used by tests/tcg and pc-bios/roms, but most of them are not needed there.

---
  configure   | 10 ----------
  meson.build |  1 -
  2 files changed, 11 deletions(-)
configure +0 -5
index 0e487ae091..650d9c0735 100755
@@ -521,9 +521,6 @@ query_pkg_config() {
  pkg_config=query_pkg_config
  sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}"
 
-# If the user hasn't specified ARFLAGS, default to 'rv', just as make does.
-ARFLAGS="${ARFLAGS-rv}"
-
  # default flags for all hosts
  # We use -fwrapv to tell the compiler that we require a C dialect where
  # left shift of signed integers is well defined and has the expected
@@ -4917,19 +4914,12 @@ echo "HOST_CC=$host_cc" >> $config_host_mak
  if $iasl -h > /dev/null 2>&1; then
    echo "CONFIG_IASL=$iasl" >> $config_host_mak
  fi
-echo "CXX=$cxx" >> $config_host_mak
-echo "OBJCC=$objcc" >> $config_host_mak
  echo "AR=$ar" >> $config_host_mak

configure echo "HOST_CC=$host_cc" >> $config_host_mak · line 4932

Quoted 10 lines
configure +0 -5
-echo "ARFLAGS=$ARFLAGS" >> $config_host_mak
  echo "AS=$as" >> $config_host_mak
  echo "CCAS=$ccas" >> $config_host_mak
  echo "CPP=$cpp" >> $config_host_mak
  echo "OBJCOPY=$objcopy" >> $config_host_mak
  echo "LD=$ld" >> $config_host_mak
-echo "RANLIB=$ranlib" >> $config_host_mak
-echo "NM=$nm" >> $config_host_mak
-echo "PKG_CONFIG=$pkg_config_exe" >> $config_host_mak
-echo "WINDRES=$windres" >> $config_host_mak

I wasn't quite sure whether we'd still need some of those e.g. for compiling capstone or dtc, but looking at meson.build again, I think you're right, we're not using "make" to build those anymore, right?

In that case:

#2 lore raw
Quoted 2 lines · Thomas Huth

I wasn't quite sure whether we'd still need some of those e.g. for compiling capstone or dtc, but looking at meson.build again, I think you're right, we're not using "make" to build those anymore, right?

Yeah, only the ROMs are built via makefiles (I'd like to reuse the tests/tcg machinery for them as well, but not yet). Also config-host.mak is not used in submodules such as SLOF or u-boot, so those are safe too.

Thanks,

Paolo

Quoted 3 lines

In that case: