Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
50d248aa
Kaydet (Commit)
50d248aa
authored
Haz 13, 2013
tarafından
Luboš Luňák
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
work around the C++11 __float128 problem with libstdc++ headers and clang
Change-Id: Ia1b443d22b3b7f6f93f1ad8c5fa760b0f1da3b83
üst
44159c6c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
3 deletions
+26
-3
Makefile-clang.mk
compilerplugins/Makefile-clang.mk
+1
-1
configure.ac
configure.ac
+25
-2
No files found.
compilerplugins/Makefile-clang.mk
Dosyayı görüntüle @
50d248aa
...
...
@@ -73,7 +73,7 @@ CLANGOBJS=
define clangbuildsrc
$(3): $(2) $(SRCDIR)/compilerplugins/Makefile-clang.mk $(CLANGOUTDIR)/clang-timestamp
@echo [build CXX] $(subst $(SRCDIR)/,,$(2))
$(QUIET)$(CXX) $(CLANGCXXFLAGS) $(CLANGWERROR) $(CLANGDEFS) $(CLANGINCLUDES) -I$(BUILDDIR)/config_host $(2) -fPIC
-std=c++11
-c -o $(3) -MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
$(QUIET)$(CXX) $(CLANGCXXFLAGS) $(CLANGWERROR) $(CLANGDEFS) $(CLANGINCLUDES) -I$(BUILDDIR)/config_host $(2) -fPIC
$(CXXFLAGS_CXX11)
-c -o $(3) -MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
-include $(CLANGOUTDIR)/$(1).d
...
...
configure.ac
Dosyayı görüntüle @
50d248aa
...
...
@@ -5647,8 +5647,31 @@ return !(i != 0 && j != 0);
// (__float128)
]])
],[ AC_MSG_RESULT(yes) ],
[ AC_MSG_RESULT(no)
HAVE_CXX11=
[
AC_MSG_RESULT(no)
# The only reason why libstdc++ headers fail with Clang in C++11 mode is because
# they use the __float128 type that Clang doesn't know (libstdc++ checks whether
# __float128 is available during its build, but it's usually built using GCC,
# and so c++config.h hardcodes __float128 being supported). As the only place
# where __float128 is actually used is in a template specialization,
# -D__float128=void will avoid the problem there while still causing a problem
# if somebody actually uses the type.
AC_MSG_CHECKING([whether -D__float128=void workaround helps])
CXXFLAGS="$CXXFLAGS -D__float128=void"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <vector>
// some Clang fail when compiling against GCC 4.7 headers with -std=gnu++0x
// (__float128)
]])
],
[
AC_MSG_RESULT(yes)
CXXFLAGS_CXX11="$CXXFLAGS_CXX11 -D__float128=void"
],
[
AC_MSG_RESULT(no)
HAVE_CXX11=
])
])
AC_LANG_POP([C++])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment