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. | 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/ppc64 = -g 341 DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH)) 342 ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),) 343 ifeq ($(USE_CLANG), true) 344 # Clang doesn't understand -gstabs 345 DEBUG_CFLAGS/$(BUILDARCH) = -g 346 else 347 DEBUG_CFLAGS/$(BUILDARCH) = -gstabs 348 endif 349 endif 350 351 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 352 FASTDEBUG_CFLAGS/ia64 = -g 353 FASTDEBUG_CFLAGS/amd64 = -g 354 FASTDEBUG_CFLAGS/ppc64 = -g 355 FASTDEBUG_CFLAGS += $(FASTDEBUG_CFLAGS/$(BUILDARCH)) 356 ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),) 357 ifeq ($(USE_CLANG), true) 358 # Clang doesn't understand -gstabs 359 FASTDEBUG_CFLAGS/$(BUILDARCH) = -g 360 else 361 FASTDEBUG_CFLAGS/$(BUILDARCH) = -gstabs 362 endif 363 endif 364 365 OPT_CFLAGS/ia64 = -g 366 OPT_CFLAGS/amd64 = -g 367 OPT_CFLAGS/ppc64 = -g 368 OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH)) 369 ifeq ($(OPT_CFLAGS/$(BUILDARCH)),) 370 ifeq ($(USE_CLANG), true) 371 # Clang doesn't understand -gstabs 372 OPT_CFLAGS/$(BUILDARCH) = -g 373 else 374 OPT_CFLAGS/$(BUILDARCH) = -gstabs 375 endif 376 endif 377 endif 378 endif 379 380 # If we are building HEADLESS, pass on to VM 381 # so it can set the java.awt.headless property 382 ifdef HEADLESS 383 CFLAGS += -DHEADLESS 384 endif 385 386 # We are building Embedded for a small device 387 # favor code space over speed 388 ifdef MINIMIZE_RAM_USAGE 389 CFLAGS += -DMINIMIZE_RAM_USAGE 390 endif 391 392 # Stack walking in the JVM relies on frame pointer (%rbp) to walk thread stack. 393 # Explicitly specify -fno-omit-frame-pointer because it is off by default 394 # starting with gcc 4.6. |