< prev index next >

make/linux/makefiles/gcc.make

Print this page




 318 #------------------------------------------------------------------------
 319 # Debug flags
 320 
 321 ifeq ($(USE_CLANG), true)
 322   # Restrict the debug information created by Clang to avoid
 323   # too big object files and speed the build up a little bit
 324   # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
 325   CFLAGS += -flimit-debug-info
 326 endif
 327 
 328 # DEBUG_BINARIES uses full -g debug information for all configs
 329 ifeq ($(DEBUG_BINARIES), true)
 330   CFLAGS += -g
 331 else
 332   # Use the stabs format for debugging information (this is the default
 333   # on gcc-2.91). It's good enough, has all the information about line
 334   # numbers and local variables, and libjvm.so is only about 16M.
 335   # Change this back to "-g" if you want the most expressive format.
 336   # (warning: that could easily inflate libjvm.so to 150M!)
 337   # Note: The Itanium gcc compiler crashes when using -gstabs.
 338   DEBUG_CFLAGS/ia64  = -g
 339   DEBUG_CFLAGS/amd64 = -g
 340   DEBUG_CFLAGS/arm   = -g
 341   DEBUG_CFLAGS/ppc   = -g
 342   DEBUG_CFLAGS/ppc64 = -g
 343   DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
 344   ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)
 345       ifeq ($(USE_CLANG), true)
 346         # Clang doesn't understand -gstabs
 347         DEBUG_CFLAGS += -g
 348       else
 349         DEBUG_CFLAGS += -gstabs
 350       endif
 351   endif
 352   
 353   ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 354     FASTDEBUG_CFLAGS/ia64  = -g
 355     FASTDEBUG_CFLAGS/amd64 = -g
 356     FASTDEBUG_CFLAGS/arm   = -g
 357     FASTDEBUG_CFLAGS/ppc   = -g
 358     FASTDEBUG_CFLAGS/ppc64 = -g
 359     FASTDEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
 360     ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),)
 361       ifeq ($(USE_CLANG), true)
 362         # Clang doesn't understand -gstabs
 363         FASTDEBUG_CFLAGS += -g
 364       else
 365         FASTDEBUG_CFLAGS += -gstabs
 366       endif
 367     endif
 368   
 369     OPT_CFLAGS/ia64  = -g
 370     OPT_CFLAGS/amd64 = -g
 371     OPT_CFLAGS/arm   = -g
 372     OPT_CFLAGS/ppc   = -g
 373     OPT_CFLAGS/ppc64 = -g
 374     OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH))
 375     ifeq ($(OPT_CFLAGS/$(BUILDARCH)),)
 376       ifeq ($(USE_CLANG), true)
 377         # Clang doesn't understand -gstabs
 378         OPT_CFLAGS += -g
 379       else
 380         OPT_CFLAGS += -gstabs
 381       endif
 382     endif
 383   endif
 384 endif
 385 
 386 # If we are building HEADLESS, pass on to VM
 387 # so it can set the java.awt.headless property
 388 ifdef HEADLESS
 389 CFLAGS += -DHEADLESS
 390 endif
 391 
 392 # We are building Embedded for a small device
 393 # favor code space over speed
 394 ifdef MINIMIZE_RAM_USAGE
 395 CFLAGS += -DMINIMIZE_RAM_USAGE
 396 endif
 397 
 398 # Stack walking in the JVM relies on frame pointer (%rbp) to walk thread stack.
 399 # Explicitly specify -fno-omit-frame-pointer because it is off by default
 400 # starting with gcc 4.6.
 401 ifndef USE_SUNCC
 402   CFLAGS += -fno-omit-frame-pointer


 318 #------------------------------------------------------------------------
 319 # Debug flags
 320 
 321 ifeq ($(USE_CLANG), true)
 322   # Restrict the debug information created by Clang to avoid
 323   # too big object files and speed the build up a little bit
 324   # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
 325   CFLAGS += -flimit-debug-info
 326 endif
 327 
 328 # DEBUG_BINARIES uses full -g debug information for all configs
 329 ifeq ($(DEBUG_BINARIES), true)
 330   CFLAGS += -g
 331 else
 332   # Use the stabs format for debugging information (this is the default
 333   # on gcc-2.91). It's good enough, has all the information about line
 334   # numbers and local variables, and libjvm.so is only about 16M.
 335   # Change this back to "-g" if you want the most expressive format.
 336   # (warning: that could easily inflate libjvm.so to 150M!)
 337   # Note: The Itanium gcc compiler crashes when using -gstabs.
 338   DASH_G_FLAG/ia64  = -g
 339   DASH_G_FLAG/amd64 = -g
 340   DASH_G_FLAG/ppc64 = -g











 341 








 342   ifeq ($(USE_CLANG), true)
 343     # Clang doesn't understand -gstabs
 344     DASH_G_FLAG/$(BUILDARCH) ?= -g
 345   else
 346     DASH_G_FLAG/$(BUILDARCH) ?= -gstabs

 347   endif
 348 
 349   DEBUG_CFLAGS += $(DASH_G_FLAG/$(BUILDARCH))
 350 
 351   ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 352     FASTDEBUG_CFLAGS += $(DASH_G_FLAG/$(BUILDARCH))
 353     OPT_CFLAGS += $(DASH_G_FLAG/$(BUILDARCH))









 354   endif
 355 endif
 356 
 357 # If we are building HEADLESS, pass on to VM
 358 # so it can set the java.awt.headless property
 359 ifdef HEADLESS
 360 CFLAGS += -DHEADLESS
 361 endif
 362 
 363 # We are building Embedded for a small device
 364 # favor code space over speed
 365 ifdef MINIMIZE_RAM_USAGE
 366 CFLAGS += -DMINIMIZE_RAM_USAGE
 367 endif
 368 
 369 # Stack walking in the JVM relies on frame pointer (%rbp) to walk thread stack.
 370 # Explicitly specify -fno-omit-frame-pointer because it is off by default
 371 # starting with gcc 4.6.
 372 ifndef USE_SUNCC
 373   CFLAGS += -fno-omit-frame-pointer
< prev index next >