Skip to content

Commit

Permalink
[osx] cross-compile powerpc-osx
Browse files Browse the repository at this point in the history
  • Loading branch information
beenje committed May 2, 2011
1 parent 3ffe565 commit d493b3b
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 25 deletions.
8 changes: 2 additions & 6 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,10 @@ lib/cpluff/libcpluff/.libs/libcpluff.a: force
$(MAKE) -C lib/cpluff/libcpluff
system/libcpluff-@ARCH@.so: lib/cpluff/libcpluff/.libs/libcpluff.a
ifeq ($(findstring osx,@ARCH@), osx)
ifeq (@ARCH@, powerpc-osx)
$(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -arch @ARCHTYPE@ -lexpat -lbundle1.o -o $@ $<
endif
ifeq (@ARCH@, x86-osx)
$(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -arch @ARCHTYPE@ -lexpat -o $@ $<
endif
ifeq (@ARCH@, arm-osx)
$(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -read_only_relocs suppress -arch armv7 -o $@ $<
else
$(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -arch @ARCHTYPE@ -lexpat $(BUNDLE1_O) -o $@ $<
endif
else
cp lib/cpluff/libcpluff/.libs/libcpluff.so $@
Expand Down
5 changes: 3 additions & 2 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,11 @@ case $host in
use_vtbdecoder=no
use_crystalhd=no
ARCH="powerpc-osx"
use_arch="ppc"
export MACOSX_DEPLOYMENT_TARGET=10.4
SYSROOT="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
# define ppc
ARCHTYPE=`arch`
ARCHTYPE="ppc"
AC_SUBST([ARCHTYPE])
;;
powerpc-*-linux-gnu*)
Expand Down Expand Up @@ -1536,7 +1537,7 @@ XB_CONFIG_MODULE([lib/ffmpeg], [
if test "$host_vendor" = "apple" ; then
./configure \
--extra-cflags="$CFLAGS $FFMPEG_EXTRACFLAGS -w -D_DARWIN_C_SOURCE -Dattribute_deprecated=" \
`if test "$cross_compiling" = "yes"; then echo --enable-cross-compile; fi` \
`if test "$use_arch" != "no"; then echo --enable-cross-compile; fi` \
`if test "$use_arch" != "no"; then echo --arch=$use_arch; fi`\
`if test "$use_cpu" != "no"; then echo --cpu=$use_cpu; fi`\
--target-os=$(tolower $(uname -s)) \
Expand Down
2 changes: 1 addition & 1 deletion lib/cmyth/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ all: $(CMYTH_LIB)

ifeq ($(findstring osx,$(ARCH)), osx)
$(CMYTH_LIB): libcmyth/libcmyth.a librefmem/librefmem.a
$(CC) $(SYSROOT) $(LDFLAGS) -bundle -o $@ @MYSQL_LIBS@ \
$(CC) $(LDFLAGS) -bundle -o $@ @MYSQL_LIBS@ \
-Wl,-all_load libcmyth/libcmyth.a librefmem/librefmem.a
else
$(CMYTH_LIB): libcmyth/libcmyth.a librefmem/librefmem.a
Expand Down
5 changes: 2 additions & 3 deletions lib/libdvd/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

ARCH=@ARCH@
SYSROOT=@SYSROOT@
CC=@CC@
CXX=@CXX@

Expand Down Expand Up @@ -46,11 +45,11 @@ all: $(SLIB)
ifeq ($(findstring osx,$(ARCH)), osx)

$(SYSDIR)/libdvdcss-$(ARCH).so: $($(WRAPPER)) libdvdcss/src/.libs/libdvdcss.a
$(CC) $(SYSROOT) $(LDFLAGS) -Wl,-alias_list,$(WRAPPER_MACH_ALIAS) -o $@ \
$(CC) $(LDFLAGS) -Wl,-alias_list,$(WRAPPER_MACH_ALIAS) -o $@ \
$(WRAPPER) libdvdcss/src/*.o $(BUNDLE1_O)

$(SYSDIR)/libdvdnav-$(ARCH).so: $($(WRAPPER)) $(DVDCSS_A) libdvdread/obj/libdvdread.a libdvdnav/obj/libdvdnav.a
$(CC) $(SYSROOT) $(LDFLAGS) -Wl,-alias_list,$(WRAPPER_MACH_ALIAS) -o $@ \
$(CC) $(LDFLAGS) -Wl,-alias_list,$(WRAPPER_MACH_ALIAS) -o $@ \
$(WRAPPER) $(DVDCSS_O) libdvdread/obj/*.o libdvdnav/obj/*.o $(BUNDLE1_O)

else
Expand Down
3 changes: 1 addition & 2 deletions lib/libsidplay2/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARCH=@ARCH@
SYSROOT=@SYSROOT@

CFLAGS +=-D_LINUX -DHAVE_UNIX -DHAVE_STRCASECMP -DHAVE_STRNCASECMP \
-DHAVE_IOS_OPENMODE -fPIC -Ilibsidplay/win/VC \
Expand Down Expand Up @@ -54,7 +53,7 @@ SLIB=@abs_top_srcdir@/system/players/paplayer/libsidplay2-@ARCH@.so

$(SLIB): $(OBJS) @abs_top_srcdir@/xbmc/linux/XHandle.o
ifeq ($(findstring osx,$(ARCH)), osx)
$(CXX) $(SYSROOT) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
$(CXX) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
-bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \
@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) @abs_top_srcdir@/xbmc/linux/XHandle.o $(BUNDLE1_O)
else
Expand Down
3 changes: 1 addition & 2 deletions lib/nosefart/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARCH=@ARCH@
SYSROOT=@SYSROOT@

CFLAGS +=-D_LINUX -fPIC -DNSF_PLAYER
CXXFLAGS +=-D_LINUX -fPIC -DNSF_PLAYER
Expand Down Expand Up @@ -28,7 +27,7 @@ SLIB=@abs_top_srcdir@/system/players/paplayer/nosefart-@ARCH@.so

$(SLIB): $(OBJS)
ifeq ($(findstring osx,$(ARCH)), osx)
$(CC) $(SYSROOT) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
$(CC) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
-bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \
@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) $(BUNDLE1_O)
else
Expand Down
3 changes: 1 addition & 2 deletions lib/stsound/StSoundLibrary/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARCH=@ARCH@
SYSROOT=@SYSROOT@

CFLAGS +=-D_LINUX -fPIC
CXXFLAGS +=-D_LINUX -fPIC
Expand All @@ -21,7 +20,7 @@ SLIB=@abs_top_srcdir@/system/players/paplayer/stsoundlibrary-@ARCH@.so

$(SLIB): $(OBJS)
ifeq ($(findstring osx,$(ARCH)), osx)
$(CXX) $(SYSROOT) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
$(CXX) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
-bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \
@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) $(BUNDLE1_O)
else
Expand Down
3 changes: 1 addition & 2 deletions lib/timidity/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARCH=@ARCH@
SYSROOT=@SYSROOT@

CFLAGS+=-D_LINUX -fPIC -DHAVE_GETTIMEOFDAY -I. -Itimidity -Ilibarc -Iutils
ifeq ($(ARCH), powerpc-osx)
Expand Down Expand Up @@ -54,7 +53,7 @@ SLIB=@abs_top_srcdir@/system/players/paplayer/timidity-@ARCH@.so

$(SLIB): $(OBJS) exports.def
ifeq ($(findstring osx,$(ARCH)), osx)
$(CXX) $(SYSROOT) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias -bundle \
$(CXX) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias -bundle \
-undefined dynamic_lookup -read_only_relocs suppress -o $@ @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) $(BUNDLE1_O)
else
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o -Wl,--version-script=exports.def
Expand Down
3 changes: 1 addition & 2 deletions lib/vgmstream/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARCH=@ARCH@
SYSROOT=@SYSROOT@

ifeq ($(findstring osx,$(ARCH)), osx)
CFLAGS +=-fms-extensions -D_LINUX -O3 -DXBMC
Expand Down Expand Up @@ -196,7 +195,7 @@ SLIB=@abs_top_srcdir@/system/players/paplayer/vgmstream-@ARCH@.so

$(SLIB): $(OBJS)
ifeq ($(findstring osx,$(ARCH)), osx)
$(CXX) $(SYSROOT) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
$(CXX) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
-bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \
@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) $(BUNDLE1_O)
else
Expand Down
3 changes: 1 addition & 2 deletions lib/xbadpcm/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARCH=@ARCH@
SYSROOT=@SYSROOT@
OBJS=uXboxAdpcmDecoder.o ADPCMDll.o
CFLAGS +=-D_LINUX -fPIC
CXXFLAGS += -D_LINUX -fPIC
Expand All @@ -8,7 +7,7 @@ SLIB=@abs_top_srcdir@/system/players/paplayer/adpcm-@ARCH@.so

$(SLIB): $(OBJS)
ifeq ($(findstring osx,$(ARCH)), osx)
$(CC) $(SYSROOT) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
$(CC) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
-bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \
@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o *.o $(BUNDLE1_O)
chmod +x $@
Expand Down
2 changes: 1 addition & 1 deletion tools/darwin/depends/xbmc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include ../Makefile.include
SOURCE=../../../../

# configuration settings
export PATH:=$(TOOLCHAIN)/bin:$(PATH)
export PATH:=$(TOOLCHAIN)/bin:$(PREFIX)/bin:$(PATH)
CONFIGURE=./configure --prefix=$(PREFIX) \
PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig \
PYTHON=$(PREFIX)/bin/python
Expand Down

0 comments on commit d493b3b

Please sign in to comment.