mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-13 06:19:00 +08:00
Stop defining _GLIBCXX_USE_C99 (#4981)
This is an internal macro defined by libstdc++ to record the result of configure checks done when GCC was built. Defining (or undefining or redefining) the macro yourself results in undefined behaviour. If the system's C library doesn't expose support for C99 or 'long long' then telling libstdc++ that it does isn't going to work. It will just mean libstdc++ tries to use features that don't actually exist in the C library. In any case, systems that don't support C99 are probably not relevant to anybody nowadays. Fixes #4975
This commit is contained in:
parent
e37620fcd4
commit
6eeea77a7c
@ -10,7 +10,7 @@ option(PROFILE "Build with gprof profiling output." OFF)
|
||||
option(COVERAGE "Build with gcov code coverage profiling." OFF)
|
||||
|
||||
# only on newer GCCs: -ftemplate-backtrace-limit=0
|
||||
add_compile_options(-DNO_PERL -DM_PI=3.14159265358979323846 -D_GLIBCXX_USE_C99 -DHAS_BOOL -DNOGDI -DBOOST_ASIO_DISABLE_KQUEUE)
|
||||
add_compile_options(-DNO_PERL -DM_PI=3.14159265358979323846 -DHAS_BOOL -DNOGDI -DBOOST_ASIO_DISABLE_KQUEUE)
|
||||
|
||||
if (MSVC)
|
||||
add_compile_options(-W3)
|
||||
|
@ -15,11 +15,10 @@ my $linux = $^O eq 'linux';
|
||||
# prevent an annoying concatenation warning by Devel::CheckLib
|
||||
$ENV{LD_RUN_PATH} //= "";
|
||||
|
||||
# _GLIBCXX_USE_C99 : to get the long long type for g++
|
||||
# HAS_BOOL : stops Perl/lib/CORE/handy.h from doing "# define bool char" for MSVC
|
||||
# NOGDI : prevents inclusion of wingdi.h which defines functions Polygon() and Polyline() in global namespace
|
||||
# BOOST_ASIO_DISABLE_KQUEUE : prevents a Boost ASIO bug on OS X: https://svn.boost.org/trac/boost/ticket/5339
|
||||
my @cflags = qw(-D_GLIBCXX_USE_C99 -DHAS_BOOL -DNOGDI -DSLIC3RXS -DBOOST_ASIO_DISABLE_KQUEUE -Dexprtk_disable_rtl_io_file -Dexprtk_disable_return_statement -Dexprtk_disable_rtl_vecops -Dexprtk_disable_string_capabilities -Dexprtk_disable_enhanced_features);
|
||||
my @cflags = qw(-DHAS_BOOL -DNOGDI -DSLIC3RXS -DBOOST_ASIO_DISABLE_KQUEUE -Dexprtk_disable_rtl_io_file -Dexprtk_disable_return_statement -Dexprtk_disable_rtl_vecops -Dexprtk_disable_string_capabilities -Dexprtk_disable_enhanced_features);
|
||||
push @cflags, "-DSLIC3R_BUILD_COMMIT=$ENV{SLIC3R_GIT_VERSION}" if defined $ENV{SLIC3R_GIT_VERSION};
|
||||
|
||||
# std=c++11 Enforce usage of C++11 (required now). Minimum compiler supported: gcc 4.9, clang 3.3, MSVC 14.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user