1 #
2 # Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation.
8 #
9 # This code is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 # version 2 for more details (a copy is included in the LICENSE file that
13 # accompanied this code).
14 #
15 # You should have received a copy of the GNU General Public License version
16 # 2 along with this work; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 #
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 # or visit www.oracle.com if you need additional information or have any
21 # questions.
22 #
471 LINK_MODE = $(LINK_MODE/$(VERSION))
472 LINK_MODE/debug =
473 LINK_MODE/optimized = -Bsymbolic -znodefs
474
475 # Have thread local errnos
476 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1)
477 CFLAGS += -mt
478 else
479 CFLAGS += -D_REENTRANT
480 endif
481
482 ifdef CC_INTERP
483 # C++ Interpreter
484 CFLAGS += -DCC_INTERP
485 endif
486
487 # Flags for Debugging
488 # The -g0 setting allows the C++ frontend to inline, which is a big win.
489 # The -xs setting disables 'lazy debug info' which puts everything in
490 # the .so instead of requiring the '.o' files.
491 ifneq ($(OBJCOPY),)
492 OPT_CFLAGS += -g0 -xs
493 endif
494 DEBUG_CFLAGS = -g
495 FASTDEBUG_CFLAGS = -g0
496 ifneq ($(OBJCOPY),)
497 DEBUG_CFLAGS += -xs
498 FASTDEBUG_CFLAGS += -xs
499 endif
500
501 # Special global options for SS12
502 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
503 # There appears to be multiple issues with the new Dwarf2 debug format, so
504 # we tell the compiler to use the older 'stabs' debug format all the time.
505 # Note that this needs to be used in optimized compiles too to be 100%.
506 # This is a workaround for SS12 (5.9) bug 6694600
507 CFLAGS += -xdebugformat=stabs
508 endif
509
510 # Enable the following CFLAGS additions if you need to compare the
511 # built ELF objects.
512 #
513 # The -g option makes static data global and the "-Qoption ccfe
514 # -xglobalstatic" option tells the compiler to not globalize static
515 # data using a unique globalization prefix. Instead force the use of
516 # a static globalization prefix based on the source filepath so the
|
1 #
2 # Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation.
8 #
9 # This code is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 # version 2 for more details (a copy is included in the LICENSE file that
13 # accompanied this code).
14 #
15 # You should have received a copy of the GNU General Public License version
16 # 2 along with this work; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 #
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 # or visit www.oracle.com if you need additional information or have any
21 # questions.
22 #
471 LINK_MODE = $(LINK_MODE/$(VERSION))
472 LINK_MODE/debug =
473 LINK_MODE/optimized = -Bsymbolic -znodefs
474
475 # Have thread local errnos
476 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1)
477 CFLAGS += -mt
478 else
479 CFLAGS += -D_REENTRANT
480 endif
481
482 ifdef CC_INTERP
483 # C++ Interpreter
484 CFLAGS += -DCC_INTERP
485 endif
486
487 # Flags for Debugging
488 # The -g0 setting allows the C++ frontend to inline, which is a big win.
489 # The -xs setting disables 'lazy debug info' which puts everything in
490 # the .so instead of requiring the '.o' files.
491 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
492 OPT_CFLAGS += -g0 -xs
493 endif
494 DEBUG_CFLAGS = -g
495 FASTDEBUG_CFLAGS = -g0
496 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
497 DEBUG_CFLAGS += -xs
498 FASTDEBUG_CFLAGS += -xs
499 endif
500
501 # Special global options for SS12
502 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
503 # There appears to be multiple issues with the new Dwarf2 debug format, so
504 # we tell the compiler to use the older 'stabs' debug format all the time.
505 # Note that this needs to be used in optimized compiles too to be 100%.
506 # This is a workaround for SS12 (5.9) bug 6694600
507 CFLAGS += -xdebugformat=stabs
508 endif
509
510 # Enable the following CFLAGS additions if you need to compare the
511 # built ELF objects.
512 #
513 # The -g option makes static data global and the "-Qoption ccfe
514 # -xglobalstatic" option tells the compiler to not globalize static
515 # data using a unique globalization prefix. Instead force the use of
516 # a static globalization prefix based on the source filepath so the
|