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