< prev index next >

make/bsd/makefiles/gcc.make

Print this page


   1 #
   2 # Copyright (c) 1999, 2015, 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 #


 313 endif
 314 
 315 OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS)
 316 
 317 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp
 318 # if we use expensive-optimizations
 319 ifeq ($(BUILDARCH), ia64)
 320 OPT_CFLAGS += -fno-expensive-optimizations
 321 endif
 322 
 323 # Work around some compiler bugs.
 324 ifeq ($(USE_CLANG), true)
 325   # Clang < 6 | <= 6.1 | <= 7.0
 326   ifeq ($(shell expr \
 327       $(CC_VER_MAJOR) \< 6 \| \
 328       \( $(CC_VER_MAJOR) = 6 \& $(CC_VER_MINOR) \<= 1 \) \| \
 329       \( $(CC_VER_MAJOR) = 7 \& $(CC_VER_MINOR) \<= 0 \) \
 330     ), 1)
 331     OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
 332     OPT_CFLAGS/unsafe.o += -O1







 333   else
 334     $(error "Update compiler workarounds for Clang $(CC_VER_MAJOR).$(CC_VER_MINOR)")
 335   endif
 336 else
 337   # Do not allow GCC 4.1.1
 338   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 1 \& $(CC_VER_MICRO) = 1), 1)
 339     $(error "GCC $(CC_VER_MAJOR).$(CC_VER_MINOR).$(CC_VER_MICRO) not supported because of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27724")
 340   endif
 341   # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
 342   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1)
 343     OPT_CFLAGS/mulnode.o += $(OPT_CFLAGS/NOOPT)
 344   endif 
 345 endif
 346 
 347 # Flags for generating make dependency flags.
 348 DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
 349 ifeq ($(USE_CLANG),)
 350   ifneq ($(CC_VER_MAJOR), 2)
 351     DEPFLAGS += -fpch-deps
 352   endif


   1 #
   2 # Copyright (c) 1999, 2016, 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 #


 313 endif
 314 
 315 OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS)
 316 
 317 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp
 318 # if we use expensive-optimizations
 319 ifeq ($(BUILDARCH), ia64)
 320 OPT_CFLAGS += -fno-expensive-optimizations
 321 endif
 322 
 323 # Work around some compiler bugs.
 324 ifeq ($(USE_CLANG), true)
 325   # Clang < 6 | <= 6.1 | <= 7.0
 326   ifeq ($(shell expr \
 327       $(CC_VER_MAJOR) \< 6 \| \
 328       \( $(CC_VER_MAJOR) = 6 \& $(CC_VER_MINOR) \<= 1 \) \| \
 329       \( $(CC_VER_MAJOR) = 7 \& $(CC_VER_MINOR) \<= 0 \) \
 330     ), 1)
 331     OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
 332     OPT_CFLAGS/unsafe.o += -O1
 333 
 334     # The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides
 335     # of OPT_CFLAGS. Restore it here.
 336     ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 337       OPT_CFLAGS/loopTransform.o += -g
 338       OPT_CFLAGS/unsafe.o += -g
 339     endif
 340   else
 341     $(error "Update compiler workarounds for Clang $(CC_VER_MAJOR).$(CC_VER_MINOR)")
 342   endif
 343 else
 344   # Do not allow GCC 4.1.1
 345   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 1 \& $(CC_VER_MICRO) = 1), 1)
 346     $(error "GCC $(CC_VER_MAJOR).$(CC_VER_MINOR).$(CC_VER_MICRO) not supported because of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27724")
 347   endif
 348   # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
 349   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1)
 350     OPT_CFLAGS/mulnode.o += $(OPT_CFLAGS/NOOPT)
 351   endif 
 352 endif
 353 
 354 # Flags for generating make dependency flags.
 355 DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
 356 ifeq ($(USE_CLANG),)
 357   ifneq ($(CC_VER_MAJOR), 2)
 358     DEPFLAGS += -fpch-deps
 359   endif


< prev index next >