diff -r de141433919f -r 9c2ecc2ffb12 make/linux/makefiles/gcc.make --- a/make/linux/makefiles/gcc.make Thu Jul 03 11:01:32 2008 -0700 +++ b/make/linux/makefiles/gcc.make Fri Jul 11 01:14:44 2008 -0700 @@ -50,14 +50,7 @@ VM_PICFLAG/LIBJVM = $(PICFLAG) VM_PICFLAG/AOUT = - -ifneq ($(BUILDARCH), i486) VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) -else -# PIC has significant overhead on x86, build nonpic VM for now. -# Link JVM at a "good" base location to avoid unnecessary .text patching. -JVM_BASE_ADDR = 0x06000000 -endif CFLAGS += $(VM_PICFLAG) CFLAGS += -fno-rtti @@ -91,8 +84,17 @@ # Compiler warnings are treated as errors WARNINGS_ARE_ERRORS = -Werror + # Except for a few acceptable ones +# Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit +# conversions which might affect the values. To avoid that, we need to turn +# it off explicitly. +ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" +ACCEPTABLE_WARNINGS = -Wpointer-arith -Wsign-compare +else ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare +endif + CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS) # Special cases CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))