Skip to content

Commit

Permalink
Fix building with GCC 9
Browse files Browse the repository at this point in the history
Nixpkgs on aarch64-linux is currently stuck on GCC 9
(NixOS/nixpkgs#208412) and using gcc11Stdenv
doesn't work either.

So use c++2a instead of c++20 for now. Unfortunately this means we
can't use some C++20 features for now (like std::span).
  • Loading branch information
edolstra committed Feb 10, 2023
1 parent 9ebbe35 commit 5978ceb
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ endif

include mk/lib.mk

GLOBAL_CXXFLAGS += -g -Wall -include config.h -std=c++20 -I src
GLOBAL_CXXFLAGS += -g -Wall -include config.h -std=c++2a -I src
2 changes: 1 addition & 1 deletion perl/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
makefiles = local.mk

GLOBAL_CXXFLAGS += -g -Wall -std=c++20 -I ../src
GLOBAL_CXXFLAGS += -g -Wall -std=c++2a -I ../src

-include Makefile.config

Expand Down
2 changes: 1 addition & 1 deletion src/libcmd/nix-cmd.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Name: Nix
Description: Nix Package Manager
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lnixcmd
Cflags: -I${includedir}/nix -std=c++20
Cflags: -I${includedir}/nix -std=c++2a
2 changes: 1 addition & 1 deletion src/libexpr/nix-expr.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Description: Nix Package Manager
Version: @PACKAGE_VERSION@
Requires: nix-store bdw-gc
Libs: -L${libdir} -lnixexpr
Cflags: -I${includedir}/nix -std=c++20
Cflags: -I${includedir}/nix -std=c++2a
2 changes: 1 addition & 1 deletion src/libmain/nix-main.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Name: Nix
Description: Nix Package Manager
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lnixmain
Cflags: -I${includedir}/nix -std=c++20
Cflags: -I${includedir}/nix -std=c++2a
2 changes: 1 addition & 1 deletion src/libstore/nix-store.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Name: Nix
Description: Nix Package Manager
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lnixstore -lnixutil
Cflags: -I${includedir}/nix -std=c++20
Cflags: -I${includedir}/nix -std=c++2a

0 comments on commit 5978ceb

Please sign in to comment.