Skip to content

Hadrian: linker error "unknown option: -zorigin"

As part of 4df75772, an additional -zorigin flag was added. This flag seems to be incompatible with the (I think default?) darwin linker. The make system seems to also be more careful about adding this flag:

ifeq "$$(TargetElf)" "YES"
LIBFFI_LIBS += -optl-Wl,-rpath -optl-Wl,'$$$$ORIGIN' -optl-Wl,-zorigin
endif
ifeq "$(TargetOS_CPP)" "darwin"
LIBFFI_LIBS += -optl-Wl,-rpath -optl-Wl,@loader_path
endif

I think all we need to do is guard "-optl-Wl,-zorigin" to not be darwin. I can submit an MR if someone can confirm this makes sense.

@DavidEichmann Thoughts? I think you've been looking at this lately and the offending commit is also yours.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information