Skip to content

Instantly share code, notes, and snippets.

@twilligon
Created April 13, 2018 16:00
Show Gist options
  • Save twilligon/5dbb29cc641b8740c918c7cb03665464 to your computer and use it in GitHub Desktop.
Save twilligon/5dbb29cc641b8740c918c7cb03665464 to your computer and use it in GitHub Desktop.
I hate autoconf
#!/bin/bash
# When autoconf configure scripts look for the LIBC PATH, they assume ld
# prefaces the paths with "attempt to open /lib/path.so" (the behavior of
# GNU ld) while lld uses a different format. With CONFIGURE_LIBC_WORKAROUND
# set the output will be transformed to GNU ld's format.
if [ -n "${CONFIGURE_LIBC_WORKAROUND+1}" ] && (echo $@ | grep -q -- "--verbose"); then
exec -a $0 ld $@ 2> >(sed "s@^$0: /\(.*\)\$@attempt to open /\1 succeeded@g" >&2)
else
exec -a $0 ld $@
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment