2014-02-01 13:23:14 +02:00
|
|
|
makefiles = \
|
2014-02-01 15:28:31 +02:00
|
|
|
local.mk \
|
2014-01-30 13:11:06 +02:00
|
|
|
src/libutil/local.mk \
|
|
|
|
src/libstore/local.mk \
|
|
|
|
src/libmain/local.mk \
|
|
|
|
src/libexpr/local.mk \
|
2016-02-09 22:28:29 +02:00
|
|
|
src/nix/local.mk \
|
2014-01-30 13:11:06 +02:00
|
|
|
src/nix-store/local.mk \
|
|
|
|
src/nix-instantiate/local.mk \
|
|
|
|
src/nix-env/local.mk \
|
|
|
|
src/nix-daemon/local.mk \
|
2015-04-22 15:21:52 +03:00
|
|
|
src/nix-collect-garbage/local.mk \
|
2016-08-10 17:44:39 +03:00
|
|
|
src/nix-copy-closure/local.mk \
|
2015-10-01 17:47:43 +03:00
|
|
|
src/nix-prefetch-url/local.mk \
|
2016-08-11 14:58:33 +03:00
|
|
|
src/buildenv/local.mk \
|
2016-08-13 21:36:22 +03:00
|
|
|
src/resolve-system-dependencies/local.mk \
|
2016-08-11 18:34:43 +03:00
|
|
|
src/nix-channel/local.mk \
|
2016-08-09 13:24:19 +03:00
|
|
|
src/nix-build/local.mk \
|
2016-07-19 01:50:27 +03:00
|
|
|
src/build-remote/local.mk \
|
2014-01-30 13:11:06 +02:00
|
|
|
scripts/local.mk \
|
|
|
|
corepkgs/local.mk \
|
2014-04-07 12:18:54 +03:00
|
|
|
misc/systemd/local.mk \
|
2014-11-04 11:14:18 +02:00
|
|
|
misc/launchd/local.mk \
|
2014-05-02 14:14:10 +03:00
|
|
|
misc/upstart/local.mk \
|
2014-02-01 12:30:21 +02:00
|
|
|
doc/manual/local.mk \
|
2018-02-08 18:26:18 +02:00
|
|
|
tests/local.mk \
|
|
|
|
tests/plugins/local.mk
|
2013-11-25 17:25:13 +02:00
|
|
|
|
Include config.h implicitly with '-include config.h' in CFLAGS
Because config.h can #define things like _FILE_OFFSET_BITS=64 and not
every compilation unit includes config.h, we currently compile half of
Nix with _FILE_OFFSET_BITS=64 and other half with _FILE_OFFSET_BITS
unset. This causes major havoc with the Settings class on e.g. 32-bit ARM,
where different compilation units disagree with the struct layout.
E.g.:
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
@@ -166,6 +166,8 @@ void Settings::update()
_get(useSubstitutes, "build-use-substitutes");
+ fprintf(stderr, "at Settings::update(): &useSubstitutes = %p\n", &nix::settings.useSubstitutes);
_get(buildUsersGroup, "build-users-group");
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -138,6 +138,8 @@ void RemoteStore::initConnection(Connection & conn)
void RemoteStore::setOptions(Connection & conn)
{
+ fprintf(stderr, "at RemoteStore::setOptions(): &useSubstitutes = %p\n", &nix::settings.useSubstitutes);
conn.to << wopSetOptions
Gave me:
at Settings::update(): &useSubstitutes = 0xb6e5c5cb
at RemoteStore::setOptions(): &useSubstitutes = 0xb6e5c5c7
That was not a fun one to debug!
2017-02-08 20:35:06 +02:00
|
|
|
GLOBAL_CXXFLAGS += -std=c++14 -g -Wall -include config.h
|
2014-03-30 01:49:23 +02:00
|
|
|
|
2015-02-17 14:16:58 +02:00
|
|
|
-include Makefile.config
|
2014-01-09 17:53:47 +02:00
|
|
|
|
2014-09-17 18:07:05 +03:00
|
|
|
OPTIMIZE = 1
|
|
|
|
|
|
|
|
ifeq ($(OPTIMIZE), 1)
|
|
|
|
GLOBAL_CFLAGS += -O3
|
|
|
|
GLOBAL_CXXFLAGS += -O3
|
|
|
|
endif
|
|
|
|
|
2013-11-25 17:25:13 +02:00
|
|
|
include mk/lib.mk
|