Skip to content

Commit e8cc3f2

Browse files
committed
auto merge of #18194 : jmesmon/rust/libbacktrace-env, r=alexcrichton
This was run into while attempting to integrate rust with bitbake's build system. I expect it's caused by some other environment variables being set to gcc but didn't track down the exact cause myself.
2 parents 2fffbe0 + d75ff2f commit e8cc3f2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

mk/rt.mk

+5-6
Original file line numberDiff line numberDiff line change
@@ -284,16 +284,15 @@ endif
284284
# ./configure script. This is done to force libbacktrace to *not* use the
285285
# atomic/sync functionality because it pulls in unnecessary dependencies and we
286286
# never use it anyway.
287-
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: \
288-
export CFLAGS:=$$(CFG_GCCISH_CFLAGS_$(1):-Werror=) \
289-
-fno-stack-protector
290-
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: export CC:=$$(CC_$(1))
291-
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: export AR:=$$(AR_$(1))
292-
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: export RANLIB:=$$(AR_$(1)) s
293287
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: $$(BACKTRACE_DEPS) $$(MKFILE_DEPS)
288+
@$$(call E, configure: libbacktrace for $(1))
294289
$$(Q)rm -rf $$(BACKTRACE_BUILD_DIR_$(1))
295290
$$(Q)mkdir -p $$(BACKTRACE_BUILD_DIR_$(1))
296291
$$(Q)(cd $$(BACKTRACE_BUILD_DIR_$(1)) && \
292+
CC="$$(CC_$(1))" \
293+
AR="$$(AR_$(1))" \
294+
RANLIB="$$(AR_$(1)) s" \
295+
CFLAGS="$$(CFG_GCCISH_CFLAGS_$(1):-Werror=) -fno-stack-protector" \
297296
$(S)src/libbacktrace/configure --target=$(1) --host=$(CFG_BUILD))
298297
$$(Q)echo '#undef HAVE_ATOMIC_FUNCTIONS' >> \
299298
$$(BACKTRACE_BUILD_DIR_$(1))/config.h

0 commit comments

Comments
 (0)