aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-01-19 13:21:37 +0000
committerErlang/OTP <[email protected]>2010-01-19 13:21:37 +0000
commit9ef7d5424fee7cd703f6fad30786358ec36a3749 (patch)
tree5396f3e6b61e861b3684710f8029a88415d7e6a5
parentcd1a07009858ba01a2a095ffb9f863d2225e572c (diff)
downloadotp-9ef7d5424fee7cd703f6fad30786358ec36a3749.tar.gz
otp-9ef7d5424fee7cd703f6fad30786358ec36a3749.tar.bz2
otp-9ef7d5424fee7cd703f6fad30786358ec36a3749.zip
OTP-8373 ERTS makefiles used to detect the use of a gcc C compiler by
checking if CC equaled gcc. That is, the makefiles failed to detect gcc C compilers with other command line names than gcc. `configure' now substitute GCC into the makefiles. If CC is a gcc C compiler, GCC will have the value yes. (Thanks to Jean-S�bastien P�dron)
-rw-r--r--erts/configure.in1
-rw-r--r--erts/emulator/Makefile.in18
-rw-r--r--erts/lib_src/Makefile.in13
-rw-r--r--make/otp.mk.in11
4 files changed, 23 insertions, 20 deletions
diff --git a/erts/configure.in b/erts/configure.in
index ea97d73aa8..48d236351b 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -325,6 +325,7 @@ dnl Checks for programs.
dnl ----------------------------------------------------------------------
AC_PROG_CC
+AC_SUBST(GCC)
dnl ---------------------------------------------------------------------
dnl Special stuff regarding CFLAGS and details in the environment...
diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in
index 903e1e96ba..bc846d1e3d 100644
--- a/erts/emulator/Makefile.in
+++ b/erts/emulator/Makefile.in
@@ -1,24 +1,25 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1996-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1996-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
include $(ERL_TOP)/make/target.mk
include ../vsn.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
ENABLE_ALLOC_TYPE_VARS = @ENABLE_ALLOC_TYPE_VARS@
HIPE_ENABLED=@HIPE_ENABLED@
@@ -213,7 +214,7 @@ else
OPT_LEVEL = -O3
endif
-ifeq ($(CC), gcc)
+ifeq ($(GCC),yes)
ifeq ($(NO_INLINE_FUNCTIONS),true)
GEN_OPT_FLGS = $(OPT_LEVEL) -fno-inline-functions
else
@@ -252,7 +253,7 @@ CS_TYPE_FLAGS = $(subst QUANTIFY,FAKE_QUANTIFY, \
$(subst PURIFY,FAKE_PURIFY, $(TYPE_FLAGS)))
endif
CS_CFLAGS_ = $(CS_TYPE_FLAGS) @DEFS@ $(WFLAGS)
-ifeq ($(CC), gcc)
+ifeq ($(GCC),yes)
CS_CFLAGS = $(subst -O2, $(GEN_OPT_FLGS) $(UNROLL_FLG), $(CS_CFLAGS_))
else
CS_CFLAGS = $(CS_CFLAGS_)
@@ -351,7 +352,6 @@ endif
CS_EXECUTABLE = child_setup$(TYPEMARKER)
# ----------------------------------------------------------------------
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
ifeq ($(ERLANG_OSTYPE), unix)
UNIX_ONLY_BUILDS = $(BINDIR)/$(CS_EXECUTABLE)
@@ -692,7 +692,7 @@ $(OBJDIR)/%.kp.o: sys/common/%.c
$(OBJDIR)/%.nkp.o: sys/common/%.c
$(CC) -DERTS_NO_KERNEL_POLL_VERSION $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
-ifeq ($(CC), gcc)
+ifeq ($(GCC),yes)
$(OBJDIR)/erl_obsolete.o: beam/erl_obsolete.c
$(CC) $(subst -Wstrict-prototypes, , $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS))) $(INCLUDES) -c $< -o $@
diff --git a/erts/lib_src/Makefile.in b/erts/lib_src/Makefile.in
index ce5c846677..1d2cc7cb0c 100644
--- a/erts/lib_src/Makefile.in
+++ b/erts/lib_src/Makefile.in
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2004-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2004-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
@@ -24,6 +24,7 @@ OMIT_OMIT_FP=no
CC=@CC@
+GCC=@GCC@
LD=@LD@
AR=@AR@
RANLIB=@RANLIB@
@@ -114,7 +115,7 @@ endif
CREATE_DIRS=
-ifeq ($(CC)-$(OMIT_FP), gcc-true)
+ifeq ($(GCC)-$(OMIT_FP),yes-true)
CFLAGS += -fomit-frame-pointer
endif
diff --git a/make/otp.mk.in b/make/otp.mk.in
index bcf9bd85a4..902def5fd8 100644
--- a/make/otp.mk.in
+++ b/make/otp.mk.in
@@ -3,20 +3,20 @@
# Make include file for otp
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1997-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
# Author: Lars Thorsen
@@ -53,6 +53,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
CC = @CC@
+GCC = @GCC@
HCC = @HCC@
CC32 = @CC32@
CFLAGS32 = @CFLAGS32@