Skip to contentSkip to conversation

Fix some configure/Makefile weirdness

PATCH New Thiemo Seufer 1 participant 1 message Dec 21, 2006 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix some configure/Makefile weirdness

Hello All,

the appended patch allows for propagating CFLAGS and LDFLAGS to the host Makefile. This reactivates the (undocumented) --extra-cflags= and --extra-ldflags= options of configure which are currently NOPs. It also removes the CFLAGS=-O2 default from configure since it is already hardcoded in Makefile and Makefile.target.

Comments?

Thiemo

Index: Makefile
===================================================================
RCS file: /sources/qemu/qemu/Makefile,v
retrieving revision 1.106

Makefile +2 -2
diff -u -p -r1.106 Makefile
@@ -5,14 +5,14 @@ include config-host.mak
 .PHONY: all clean distclean dvi info install install-doc tar tarbin \
 	speed test test2 html dvi info
 
-CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I.
+CFLAGS+=-Wall -O2 -g -fno-strict-aliasing -I.
 ifdef CONFIG_DARWIN
 CFLAGS+= -mdynamic-no-pic
 endif
 ifeq ($(ARCH),sparc)
 CFLAGS+=-mcpu=ultrasparc
 endif
-LDFLAGS=-g
+LDFLAGS+=-g
 LIBS=
 DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 TOOLS=qemu-img$(EXESUF)

Index: configure
===================================================================
RCS file: /sources/qemu/qemu/configure,v
retrieving revision 1.113

configure +0 -5
diff -u -p -r1.113 configure
@@ -243,11 +243,6 @@ for opt do
   esac
 done
 
-# Checking for CFLAGS
-if test -z "$CFLAGS"; then
-    CFLAGS="-O2"
-fi
-
 if test x"$show_help" = x"yes" ; then
 cat << EOF