Disable some advanced (post glibc-2.3) libuv features when building snaps.

This commit is contained in:
Graydon Hoare 2012-03-26 15:54:22 -07:00
parent 45a709766c
commit bd0399863f
3 changed files with 14 additions and 4 deletions

View File

@ -27,6 +27,15 @@
LIBUV_FLAGS_i386 = -m32 -fPIC
LIBUV_FLAGS_x86_64 = -m64 -fPIC
# when we're doing a snapshot build, we intentionally degrade as many
# features in libuv and the runtime as possible, to ease portability.
SNAP_DEFINES:=
ifneq ($(strip $(findstring snap,$(MAKECMDGOALS))),)
SNAP_DEFINES=-DRUST_SNAPSHOT
endif
define DEF_RUNTIME_TARGETS
######################################################################
@ -107,7 +116,8 @@ RUNTIME_LIBS_$(1) := $$(LIBUV_LIB_$(1))
rt/$(1)/%.o: rt/%.cpp $$(RUNTIME_HDR_$(1)) $$(MKFILE_DEPS)
@$$(call E, compile: $$@)
$$(Q)$$(call CFG_COMPILE_C_$(1), $$@, $$(RUNTIME_INCS_$(1))) $$<
$$(Q)$$(call CFG_COMPILE_C_$(1), $$@, $$(RUNTIME_INCS_$(1)) \
$$(SNAP_DEFINES)) $$<
rt/$(1)/%.o: rt/%.S $$(RUNTIME_HDR_$(1)) $$(MKFILE_DEPS) \
$$(LLVM_CONFIG_$$(CFG_HOST_TRIPLE))
@ -144,7 +154,7 @@ endif
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
$$(Q)$$(MAKE) -C $$(S)mk/libuv/$$(LIBUV_ARCH_$(1))/$$(LIBUV_OSTYPE_$(1)) \
CFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1)))" \
CFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
LDFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1)))" \
CC="$$(CFG_GCCISH_CROSS)$$(CC)" \
CXX="$$(CFG_GCCISH_CROSS)$$(CXX)" \

@ -1 +1 @@
Subproject commit 1170ffba3ac5191930b40c897d4569a9d8a296a3
Subproject commit 1d6aec9d54c7a684ade521f71a4d538a6a88b14f

View File

@ -168,7 +168,7 @@ rust_run_program(const char* argv[],
*_NSGetEnviron() = (char **)envp;
}
execvp(argv[0], (char * const *)argv);
#elif __FreeBSD__
#elif __FreeBSD__ || (defined(__linux__) && defined(RUST_SNAPSHOT))
if (envp) { environ = (char **)envp; }
execvp(argv[0], (char * const *)argv);
#else