make/bsd/makefiles/gcc.make
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-comp Sdiff make/bsd/makefiles

make/bsd/makefiles/gcc.make

Print this page




 263 WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wformat=2
 264 
 265 ifeq ($(USE_CLANG),)
 266   # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
 267   # conversions which might affect the values. Only enable it in earlier versions.
 268   ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
 269     WARNINGS_FLAGS += -Wconversion
 270   endif
 271 endif
 272 
 273 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS)
 274 # Special cases
 275 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
 276 # XXXDARWIN: for _dyld_bind_fully_image_containing_address
 277 ifeq ($(OS_VENDOR), Darwin)
 278   CFLAGS_WARN/os_bsd.o = $(CFLAGS_WARN/DEFAULT) -Wno-deprecated-declarations
 279 endif
 280 
 281 # optimization control flags (Used by fastdebug and release variants)
 282 OPT_CFLAGS/NOOPT=-O0
 283 ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 8 \) \))" "1"


 284   # Allow basic optimizations which don't distrupt debugging. (Principally dead code elimination)
 285   OPT_CFLAGS/DEBUG=-Og
 286 else
 287   # Allow no optimizations.
 288  OPT_CFLAGS/DEBUG=-O0
 289 endif
 290 OPT_CFLAGS/SIZE=-Os
 291 OPT_CFLAGS/SPEED=-O3
 292 
 293 ifeq ($(OS_VENDOR), Darwin)
 294   # use -Os by default, unless -O3 can be proved to be worth the cost, as per policy
 295   # <https://wiki.openjdk.java.net/display/MacOSXPort/Compiler+Errata>
 296   OPT_CFLAGS_DEFAULT ?= SIZE
 297 else
 298   OPT_CFLAGS_DEFAULT ?= SPEED
 299 endif
 300 
 301 # Hotspot uses very unstrict aliasing turn this optimization off
 302 # This option is added to CFLAGS rather than OPT_CFLAGS
 303 # so that OPT_CFLAGS overrides get this option too.


 426   # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj
 427   SONAMEFLAG = -Xlinker -soname=SONAME
 428 
 429   # Build shared library
 430   SHARED_FLAG = -shared $(VM_PICFLAG)
 431 
 432   # Keep symbols even they are not used
 433   AOUT_FLAGS += -Xlinker -export-dynamic
 434 endif
 435 
 436 #------------------------------------------------------------------------
 437 # Debug flags
 438 
 439 ifeq ($(USE_CLANG), true)
 440   # Restrict the debug information created by Clang to avoid
 441   # too big object files and speed the build up a little bit
 442   # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
 443   CFLAGS += -flimit-debug-info
 444 endif
 445 
 446 ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 8 \) \))" "1"


 447   # Allow basic optimizations which don't distrupt debugging. (Principally dead code elimination)
 448   DEBUG_CFLAGS=-Og
 449 else
 450   # Allow no optimizations.
 451   DEBUG_CFLAGS=-O0
 452 endif
 453 
 454 # DEBUG_BINARIES uses full -g debug information for all configs
 455 ifeq ($(DEBUG_BINARIES), true)
 456   CFLAGS += -g
 457 else
 458   # Use the stabs format for debugging information (this is the default
 459   # on gcc-2.91). It's good enough, has all the information about line
 460   # numbers and local variables, and libjvm.so is only about 16M.
 461   # Change this back to "-g" if you want the most expressive format.
 462   # (warning: that could easily inflate libjvm.so to 150M!)
 463   # Note: The Itanium gcc compiler crashes when using -gstabs.
 464   DEBUG_CFLAGS/ia64  = -g
 465   DEBUG_CFLAGS/amd64 = -g
 466   DEBUG_CFLAGS/arm   = -g




 263 WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wformat=2
 264 
 265 ifeq ($(USE_CLANG),)
 266   # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
 267   # conversions which might affect the values. Only enable it in earlier versions.
 268   ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
 269     WARNINGS_FLAGS += -Wconversion
 270   endif
 271 endif
 272 
 273 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS)
 274 # Special cases
 275 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
 276 # XXXDARWIN: for _dyld_bind_fully_image_containing_address
 277 ifeq ($(OS_VENDOR), Darwin)
 278   CFLAGS_WARN/os_bsd.o = $(CFLAGS_WARN/DEFAULT) -Wno-deprecated-declarations
 279 endif
 280 
 281 # optimization control flags (Used by fastdebug and release variants)
 282 OPT_CFLAGS/NOOPT=-O0
 283 ifeq ($(USE_CLANG), true)
 284   OPT_CFLAGS/DEBUG=-O0
 285 else ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 8 \) \))" "1"
 286   # Allow basic optimizations which don't distrupt debugging. (Principally dead code elimination)
 287   OPT_CFLAGS/DEBUG=-Og
 288 else
 289   # Allow no optimizations.
 290  OPT_CFLAGS/DEBUG=-O0
 291 endif
 292 OPT_CFLAGS/SIZE=-Os
 293 OPT_CFLAGS/SPEED=-O3
 294 
 295 ifeq ($(OS_VENDOR), Darwin)
 296   # use -Os by default, unless -O3 can be proved to be worth the cost, as per policy
 297   # <https://wiki.openjdk.java.net/display/MacOSXPort/Compiler+Errata>
 298   OPT_CFLAGS_DEFAULT ?= SIZE
 299 else
 300   OPT_CFLAGS_DEFAULT ?= SPEED
 301 endif
 302 
 303 # Hotspot uses very unstrict aliasing turn this optimization off
 304 # This option is added to CFLAGS rather than OPT_CFLAGS
 305 # so that OPT_CFLAGS overrides get this option too.


 428   # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj
 429   SONAMEFLAG = -Xlinker -soname=SONAME
 430 
 431   # Build shared library
 432   SHARED_FLAG = -shared $(VM_PICFLAG)
 433 
 434   # Keep symbols even they are not used
 435   AOUT_FLAGS += -Xlinker -export-dynamic
 436 endif
 437 
 438 #------------------------------------------------------------------------
 439 # Debug flags
 440 
 441 ifeq ($(USE_CLANG), true)
 442   # Restrict the debug information created by Clang to avoid
 443   # too big object files and speed the build up a little bit
 444   # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
 445   CFLAGS += -flimit-debug-info
 446 endif
 447 
 448 ifeq ($(USE_CLANG), true)
 449   DEBUG_CFLAGS=-O0
 450 else ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 8 \) \))" "1"
 451   # Allow basic optimizations which don't distrupt debugging. (Principally dead code elimination)
 452   DEBUG_CFLAGS=-Og
 453 else
 454   # Allow no optimizations.
 455   DEBUG_CFLAGS=-O0
 456 endif
 457 
 458 # DEBUG_BINARIES uses full -g debug information for all configs
 459 ifeq ($(DEBUG_BINARIES), true)
 460   CFLAGS += -g
 461 else
 462   # Use the stabs format for debugging information (this is the default
 463   # on gcc-2.91). It's good enough, has all the information about line
 464   # numbers and local variables, and libjvm.so is only about 16M.
 465   # Change this back to "-g" if you want the most expressive format.
 466   # (warning: that could easily inflate libjvm.so to 150M!)
 467   # Note: The Itanium gcc compiler crashes when using -gstabs.
 468   DEBUG_CFLAGS/ia64  = -g
 469   DEBUG_CFLAGS/amd64 = -g
 470   DEBUG_CFLAGS/arm   = -g


make/bsd/makefiles/gcc.make
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File