[LLVMbugs] [Bug 14539] New: llvm-config only provide minimum set of flags needed to compile code that interfaces with LLVM
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Dec 7 13:28:07 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=14539
Bug #: 14539
Summary: llvm-config only provide minimum set of flags needed
to compile code that interfaces with LLVM
Product: new-bugs
Version: 3.2
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: howarth at nitro.med.uc.edu
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Currently, llvm-config returns compiler flags with --cflags, --cxxflags and
--cpp-flags that are unnecessary to compile code that interfaces with LLVM, In
particular, dragonegg in the 3.2 release can no longer be compiled with FSF gcc
if the installed LLVM was built with clang because the -Wcovered-switch-default
flag is provided by llvm-config. The following patch has to be used to avoid
this problem in llvm/dragonegg 3.2...
--- dragonegg-3.2/Makefile.orig 2012-12-07 12:50:30.000000000 -0500
+++ dragonegg-3.2/Makefile 2012-12-07 12:51:21.000000000 -0500
@@ -42,8 +42,8 @@
else
COMMON_FLAGS+=-fvisibility=hidden
endif
-CFLAGS+=$(COMMON_FLAGS) $(shell $(LLVM_CONFIG) --cflags)
-CXXFLAGS+=$(COMMON_FLAGS) $(shell $(LLVM_CONFIG) --cxxflags)
+CFLAGS+=$(COMMON_FLAGS) $(shell $(LLVM_CONFIG) --cflags | sed -e
's/-Wcovered-switch-default//')
+CXXFLAGS+=$(COMMON_FLAGS) $(shell $(LLVM_CONFIG) --cxxflags | sed -e
's/-Wcovered-switch-default//')
ifeq ($(shell uname),Darwin)
LOADABLE_MODULE_OPTIONS=-bundle -undefined dynamic_lookup
@@ -76,7 +76,7 @@
ALL_OBJECTS=$(PLUGIN_OBJECTS) $(TARGET_OBJECT) $(TARGET_UTIL_OBJECTS)
-CPP_OPTIONS+=$(CPPFLAGS) $(shell $(LLVM_CONFIG) --cppflags) \
+CPP_OPTIONS+=$(CPPFLAGS) $(shell $(LLVM_CONFIG) --cppflags | sed -e
's/-Wcovered-switch-default//') \
-fno-rtti \
-MD -MP \
-DIN_GCC -DLLVM_VERSION=\"$(LLVM_VERSION)\" \
so that FSF gcc 4.7.2 can be used to build dragonegg 3.2 against an llvm 3.2
built with clang. Such a patch should not be necessary.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list