 -    SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
 -  fi
 -
+ # More hacks to build DLLs on Windows.
    case "${host}" in
-   # More hacks to build DLLs on Windows.
    *-*-cygwin*)
      SHARED_LDFLAGS="-no-undefined"
 -    SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
 +    SHARED_LIBADD="-liberty -lintl -lcygwin -lkernel32"
    ;;
  
-   # Use built-in libintl on macOS, since it is not provided by libc.
-   *-*-darwin*)
+   # Hack to build or1k-src on OSX
+   or1k*-*-darwin*)
 -    SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl"
 +    SHARED_LIBADD="-liberty -lintl"
    ;;
    esac
  
 diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
-index 4f06074a..6836c589 100644
+index 925e7ff651..47b395c195 100644
 --- a/opcodes/Makefile.am
 +++ b/opcodes/Makefile.am
-@@ -51,7 +51,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir)
+@@ -52,7 +52,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir)
  endif
  
  # This is where bfd.h lives.

 
 BUILD_LIBS = @BUILD_LIBS@
 BUILD_LIB_DEPS = @BUILD_LIB_DEPS@
@@ -301,7 +301,7 @@ OFILES = @BFD_MACHINES@
 # development.sh is used to determine -Werror default.
 CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
 

 
 AC_CHECK_DECLS([basename, stpcpy])
 
@@ -134,61 +135,27 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
 
 LT_LIB_M
 
