2016-05-12 08:26:36 +00:00
|
|
|
SRC_RS = lib.rs
|
2016-02-29 06:44:04 +00:00
|
|
|
LIBS = libcore-rust
|
|
|
|
vpath % $(REP_DIR)/src/lib/rust/libunwind
|
2018-01-03 17:40:54 +00:00
|
|
|
|
|
|
|
CC_CXX_WARN_STRICT =
|
2019-08-22 12:21:30 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# libunwind contains the public symbol '_Unwind_Resume', which clashes with
|
|
|
|
# the symbol provided by the cxx library. The aliasing can lead to unexpected
|
|
|
|
# symbol resolutions by the dynamic linker at runtime, i.e., a C++ exception
|
|
|
|
# thrown in the libc ending up in the '_Unwind_Resume' code of libunwind-rust.
|
|
|
|
#
|
|
|
|
# This rule solves this uncertainty by making the symbol private to the
|
|
|
|
# libunwind library.
|
|
|
|
#
|
|
|
|
ifeq ($(called_from_lib_mk),yes)
|
|
|
|
$(LIB).lib.a: hide_cxx_symbols
|
|
|
|
hide_cxx_symbols: lib.o
|
|
|
|
$(VERBOSE)cp $< $<.tmp
|
|
|
|
$(VERBOSE)$(OBJCOPY) --localize-symbol=_Unwind_Resume $<.tmp $<
|
|
|
|
endif
|