2014-02-01 12:23:14 +01:00
|
|
|
makefiles = \
|
2014-02-01 14:28:31 +01:00
|
|
|
local.mk \
|
2014-01-30 12:11:06 +01:00
|
|
|
src/libutil/local.mk \
|
|
|
|
src/libstore/local.mk \
|
|
|
|
src/libmain/local.mk \
|
|
|
|
src/libexpr/local.mk \
|
2016-02-09 21:28:29 +01:00
|
|
|
src/nix/local.mk \
|
2014-01-30 12:11:06 +01:00
|
|
|
src/nix-store/local.mk \
|
|
|
|
src/nix-instantiate/local.mk \
|
|
|
|
src/nix-env/local.mk \
|
|
|
|
src/nix-daemon/local.mk \
|
2015-04-22 14:21:52 +02:00
|
|
|
src/nix-collect-garbage/local.mk \
|
2016-08-10 16:44:39 +02:00
|
|
|
src/nix-copy-closure/local.mk \
|
2015-10-01 16:47:43 +02:00
|
|
|
src/nix-prefetch-url/local.mk \
|
2016-08-11 13:58:33 +02:00
|
|
|
src/buildenv/local.mk \
|
2016-08-13 20:36:22 +02:00
|
|
|
src/resolve-system-dependencies/local.mk \
|
2016-08-11 17:34:43 +02:00
|
|
|
src/nix-channel/local.mk \
|
2016-08-09 12:24:19 +02:00
|
|
|
src/nix-build/local.mk \
|
2016-07-19 00:50:27 +02:00
|
|
|
src/build-remote/local.mk \
|
2014-01-30 12:11:06 +01:00
|
|
|
scripts/local.mk \
|
|
|
|
corepkgs/local.mk \
|
2014-04-07 11:18:54 +02:00
|
|
|
misc/systemd/local.mk \
|
2014-11-04 10:14:18 +01:00
|
|
|
misc/launchd/local.mk \
|
2014-05-02 13:14:10 +02:00
|
|
|
misc/upstart/local.mk \
|
2014-02-01 11:30:21 +01:00
|
|
|
doc/manual/local.mk \
|
2018-02-08 17:26:18 +01:00
|
|
|
tests/local.mk \
|
|
|
|
tests/plugins/local.mk
|
2013-11-25 16:25:13 +01: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 19:35:06 +01:00
|
|
|
GLOBAL_CXXFLAGS += -std=c++14 -g -Wall -include config.h
|
2014-03-30 00:49:23 +01:00
|
|
|
|
2015-02-17 13:16:58 +01:00
|
|
|
-include Makefile.config
|
2014-01-09 16:53:47 +01:00
|
|
|
|
2014-09-17 17:07:05 +02:00
|
|
|
OPTIMIZE = 1
|
|
|
|
|
|
|
|
ifeq ($(OPTIMIZE), 1)
|
|
|
|
GLOBAL_CFLAGS += -O3
|
|
|
|
GLOBAL_CXXFLAGS += -O3
|
|
|
|
endif
|
|
|
|
|
2013-11-25 16:25:13 +01:00
|
|
|
include mk/lib.mk
|