make/linux/makefiles/gcc.make

Print this page
rev 6174 : 8033251: Use DWARF debug symbols for Linux 32-bit as default
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/amd64 = -g
 348   DEBUG_CFLAGS/arm   = -g
 349   DEBUG_CFLAGS/ppc   = -g
 350   DEBUG_CFLAGS/ppc64 = -g
 351   DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
 352   ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)
 353       ifeq ($(USE_CLANG), true)
 354         # Clang doesn't understand -gstabs
 355         DEBUG_CFLAGS += -g
 356       else
 357         DEBUG_CFLAGS += -gstabs
 358       endif
 359   endif
 360   
 361   ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 362     FASTDEBUG_CFLAGS/ia64  = -g
 363     FASTDEBUG_CFLAGS/amd64 = -g
 364     FASTDEBUG_CFLAGS/arm   = -g
 365     FASTDEBUG_CFLAGS/ppc   = -g
 366     FASTDEBUG_CFLAGS/ppc64 = -g
 367     FASTDEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
 368     ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),)
 369       ifeq ($(USE_CLANG), true)
 370         # Clang doesn't understand -gstabs
 371         FASTDEBUG_CFLAGS += -g
 372       else
 373         FASTDEBUG_CFLAGS += -gstabs
 374       endif
 375     endif
 376   
 377     OPT_CFLAGS/ia64  = -g
 378     OPT_CFLAGS/amd64 = -g
 379     OPT_CFLAGS/arm   = -g
 380     OPT_CFLAGS/ppc   = -g
 381     OPT_CFLAGS/ppc64 = -g
 382     OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH))
 383     ifeq ($(OPT_CFLAGS/$(BUILDARCH)),)
 384       ifeq ($(USE_CLANG), true)
 385         # Clang doesn't understand -gstabs
 386         OPT_CFLAGS += -g
 387       else
 388         OPT_CFLAGS += -gstabs
 389       endif
 390     endif
 391   endif
 392 endif
 393 
 394 # If we are building HEADLESS, pass on to VM
 395 # so it can set the java.awt.headless property
 396 ifdef HEADLESS
 397 CFLAGS += -DHEADLESS
 398 endif
 399 
 400 # We are building Embedded for a small device
 401 # favor code space over speed
 402 ifdef MINIMIZE_RAM_USAGE
 403 CFLAGS += -DMINIMIZE_RAM_USAGE
 404 endif
 405 
 406 # Stack walking in the JVM relies on frame pointer (%rbp) to walk thread stack.
 407 # Explicitly specify -fno-omit-frame-pointer because it is off by default
 408 # starting with gcc 4.6.
 409 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