Skip to contentSkip to conversation

when overriding default tool names don't add cross-prefix

PATCH Applied Stuart yoder 2 participants 2 messages Aug 4, 2011 – Aug 5, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 when overriding default tool names don't add cross-prefix

From: Stuart Yoder <[email protected]>

When overriding a tool name via a shell variable, don't tack on the cross-prefix. This specifically allows the pkg-config command to be overridden and work where it does not exist in some cross build environments.

---
 configure |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
configure +8 -8
index 38e3724..ad522f2 100755
@@ -217,14 +217,14 @@ done
 # Using uname is really, really broken.  Once we have the right set of checks
 # we can eliminate it's usage altogether
 
-cc="${cross_prefix}${CC-gcc}"
-ar="${cross_prefix}${AR-ar}"
-objcopy="${cross_prefix}${OBJCOPY-objcopy}"
-ld="${cross_prefix}${LD-ld}"
-strip="${cross_prefix}${STRIP-strip}"
-windres="${cross_prefix}${WINDRES-windres}"
-pkg_config="${cross_prefix}${PKG_CONFIG-pkg-config}"
-sdl_config="${cross_prefix}${SDL_CONFIG-sdl-config}"
+cc="${CC-${cross_prefix}gcc}"
+ar="${AR-${cross_prefix}ar}"
+objcopy="${OBJCOPY-${cross_prefix}objcopy}"
+ld="${LD-${cross_prefix}ld}"
+strip="${STRIP-${cross_prefix}strip}"
+windres="${WINDRES-${cross_prefix}windres}"
+pkg_config="${PKG_CONFIG-${cross_prefix}pkg-config}"
+sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"
 
 # default flags for all hosts
 QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 8 lines · Stuart yoder

From: Stuart Yoder<[email protected]>

When overriding a tool name via a shell variable, don't tack on the cross-prefix. This specifically allows the pkg-config command to be overridden and work where it does not exist in some cross build environments.

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 31 lines
---
  configure |   16 ++++++++--------
  1 files changed, 8 insertions(+), 8 deletions(-)
configure +8 -8
index 38e3724..ad522f2 100755
@@ -217,14 +217,14 @@ done
  # Using uname is really, really broken.  Once we have the right set of checks
  # we can eliminate it's usage altogether
 
-cc="${cross_prefix}${CC-gcc}"
-ar="${cross_prefix}${AR-ar}"
-objcopy="${cross_prefix}${OBJCOPY-objcopy}"
-ld="${cross_prefix}${LD-ld}"
-strip="${cross_prefix}${STRIP-strip}"
-windres="${cross_prefix}${WINDRES-windres}"
-pkg_config="${cross_prefix}${PKG_CONFIG-pkg-config}"
-sdl_config="${cross_prefix}${SDL_CONFIG-sdl-config}"
+cc="${CC-${cross_prefix}gcc}"
+ar="${AR-${cross_prefix}ar}"
+objcopy="${OBJCOPY-${cross_prefix}objcopy}"
+ld="${LD-${cross_prefix}ld}"
+strip="${STRIP-${cross_prefix}strip}"
+windres="${WINDRES-${cross_prefix}windres}"
+pkg_config="${PKG_CONFIG-${cross_prefix}pkg-config}"
+sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"
 
  # default flags for all hosts
  QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"