]> xenbits.xensource.com Git - unikraft/libs/libcxx.git/commit
Makefile.uk: Add -D_GNU_SOURCE to C++ flags
authorAndrei Tatar <andrei@unikraft.io>
Tue, 22 Aug 2023 13:31:11 +0000 (15:31 +0200)
committerUnikraft <monkey@unikraft.io>
Thu, 31 Aug 2023 09:48:43 +0000 (09:48 +0000)
commit6aa8f986d1413e97556d28a4feb557d4168d55c1
tree861ccce9b7bc2116c05f197cc8f0fd04c5812c40
parent76634cadd0c180fbb70624ce18c36678fd078520
Makefile.uk: Add -D_GNU_SOURCE to C++ flags

libcxx uses strtod_l, strtof_l & strtold_l in include/locale, which are
declared in stdlib.h only if _GNU_SOURCE is defined. GCC by default
sets _GNU_SOURCE when compiling C++ for this exact reason, but clang does
not, leading to compilation errors.
This change adds -D_GNU_SOURCE as a compilation flag to all C++ files
when using libcxx.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #34
Makefile.uk