make/linux/makefiles/gcc.make

Print this page
rev 6177 : 8033251: Use DWARF debug symbols for Linux 32-bit as default (01)


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


 320 # Build shared library
 321 SHARED_FLAG = -shared
 322 
 323 # Keep symbols even they are not used
 324 AOUT_FLAGS += -Xlinker -export-dynamic
 325 
 326 #------------------------------------------------------------------------
 327 # Debug flags
 328 
 329 ifeq ($(USE_CLANG), true)
 330   # Restrict the debug information created by Clang to avoid
 331   # too big object files and speed the build up a little bit
 332   # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
 333   CFLAGS += -flimit-debug-info
 334 endif
 335 
 336 # DEBUG_BINARIES uses full -g debug information for all configs
 337 ifeq ($(DEBUG_BINARIES), true)
 338   CFLAGS += -g
 339 else












 340   DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
 341   ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)


 342     DEBUG_CFLAGS += -g



 343   endif
 344 
 345   ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 346     FASTDEBUG_CFLAGS += $(FASTDEBUG_CFLAGS/$(BUILDARCH))






 347     ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),)


 348       FASTDEBUG_CFLAGS += -g



 349     endif
 350 






 351     OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH))
 352     ifeq ($(OPT_CFLAGS/$(BUILDARCH)),)


 353       OPT_CFLAGS += -g



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