Files
macports-ports/graphics/exact-image/files/patch-static-library-ar.diff

17 lines
611 B
Diff

Use ar to link static libraries to support universal builds.
I don't understand why upstream stopped using ar back in version 0.0.3.
--- build/bottom.make.orig 2019-09-29 15:33:10.000000000 -0500
+++ build/bottom.make 2024-01-05 16:46:42.000000000 -0600
@@ -62,10 +62,7 @@
$($(X_MODULE)_OUTPUT)/$(BINARY)$(X_LIBEXT): $($(X_MODULE)_OBJS)
@echo ' LINK LIB $@'
- $(Q)$(LD) -r -o '$@' $^
-# # no AR anymore due to static initilizers
-# $(Q)$(AR) r '$@' $^ 2> /dev/null
-# $(Q)$(RANLIB) '$@'
+ $(Q)$(AR) -rcs '$@' $^
$($(X_MODULE)_OUTPUT)/$(BINARY)$(X_DYNEXT): $($(X_MODULE)_OBJS)
@echo ' LINK DYN $@'