Patchwork OSX universal binaries

login
register
about
Submitter Mark Pustjens
Date 2011-09-29 15:07:09
Message ID <alpine.LNX.2.02.1109291704540.19724@localhost.localdomain>
Download mbox | patch
Permalink /patch/3418/
State Bitrotted
Headers show

Comments

Mark Pustjens - 2011-09-29 15:07:09
Hi List,

The included patch will cause flashrom to be built as a universal binary 
on osx. Included architectures are i386 and x86_64.

Greetings/Groetjes

Mark Pustjens

Patch

Index: Makefile
===================================================================
--- Makefile	(revision 1450)
+++ Makefile	(working copy)
@@ -43,9 +43,9 @@ 
  STRIP_ARGS = -s
  endif
  ifeq ($(OS_ARCH), Darwin)
-CPPFLAGS += -I/opt/local/include -I/opt/local/include -I/usr/local/include
+CPPFLAGS += -arch i386 -arch x86_64 -I/opt/local/include -I/usr/local/include
  # DirectHW framework can be found in the DirectHW library.
-LDFLAGS += -framework IOKit -framework DirectHW -L/opt/local/lib -L/usr/local/lib
+LDFLAGS += -framework IOKit -framework DirectHW -L/usr/local/lib -arch i386 -arch x86_64
  endif
  ifeq ($(OS_ARCH), FreeBSD)
  CPPFLAGS += -I/usr/local/include
@@ -530,7 +530,7 @@ 
  TAROPTIONS = $(shell LC_ALL=C tar --version|grep -q GNU && echo "--owner=root --group=root")

  %.o: %.c .features
-	$(CC) -MMD $(CFLAGS) $(CPPFLAGS) $(FEATURE_CFLAGS) $(SVNDEF) -o $@ -c $<
+	$(CC) $(CFLAGS) $(CPPFLAGS) $(FEATURE_CFLAGS) $(SVNDEF) -o $@ -c $<

  # Make sure to add all names of generated binaries here.
  # This includes all frontends and libflashrom.