[131415] trunk/dports/devel/libunwind
jeremyhu at macports.org
jeremyhu at macports.org
Sun Jan 11 13:53:36 PST 2015
Revision: 131415
https://trac.macports.org/changeset/131415
Author: jeremyhu at macports.org
Date: 2015-01-11 13:53:36 -0800 (Sun, 11 Jan 2015)
Log Message:
-----------
libunwind: Build for ppc
Modified Paths:
--------------
trunk/dports/devel/libunwind/Portfile
trunk/dports/devel/libunwind/files/Makefile
Added Paths:
-----------
trunk/dports/devel/libunwind/files/libunwind-ppc.patch
Modified: trunk/dports/devel/libunwind/Portfile
===================================================================
--- trunk/dports/devel/libunwind/Portfile 2015-01-11 21:33:47 UTC (rev 131414)
+++ trunk/dports/devel/libunwind/Portfile 2015-01-11 21:53:36 UTC (rev 131415)
@@ -5,8 +5,8 @@
name libunwind
version 3.5.0
-revision 3
-subport ${name}-headers { revision 4 }
+revision 4
+subport ${name}-headers { }
epoch 1
categories devel
platforms darwin
@@ -36,6 +36,7 @@
}
patchfiles \
+ libunwind-ppc.patch \
no-builtin_unreachable.patch \
libunwind-available.patch
@@ -68,9 +69,8 @@
depends_lib-append port:libunwind-headers
# 3.5 and 3.6 are blacklisted to prevent dependency cycles
- compiler.blacklist *gcc* {clang < 100} macports-clang-3.5 macports-clang-3.6
+ compiler.blacklist macports-clang-3.5 macports-clang-3.6
- supported_archs i386 x86_64
variant universal {}
patchfiles-append \
@@ -85,14 +85,17 @@
configure.ldflags-append -lmacho
}
+ configure.cflags-append -std=gnu99
+
build.args \
PREFIX="${prefix}" \
CC="${configure.cc}" \
CXX="${configure.cxx}" \
CPPFLAGS="${configure.cppflags} -DNDEBUG" \
- CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
- CXXFLAGS="${configure.cxxflags} ${cxx_stdlibflags} [get_canonical_archflags cxx]" \
- LDFLAGS="${configure.ldflags} ${cxx_stdlibflags} [get_canonical_archflags ld]" \
+ CFLAGS="${configure.cflags}" \
+ CXXFLAGS="${configure.cxxflags} ${cxx_stdlibflags}" \
+ LDFLAGS="${configure.ldflags} ${cxx_stdlibflags}" \
+ RC_ARCHS="[get_canonical_archs]" \
LIBUNWIND_CURRENT_VERSION=${version}
destroot.target installlibs
Modified: trunk/dports/devel/libunwind/files/Makefile
===================================================================
--- trunk/dports/devel/libunwind/files/Makefile 2015-01-11 21:33:47 UTC (rev 131414)
+++ trunk/dports/devel/libunwind/files/Makefile 2015-01-11 21:53:36 UTC (rev 131415)
@@ -28,7 +28,7 @@
# Default archs
RC_ARCHS = i386 x86_64
-ARC_FLAGS := $(foreach arch,$(RC_ARCHS),-arch $(arch))
+ARCH_FLAGS := $(foreach arch,$(RC_ARCHS),-arch $(arch))
# Use an SDK?
ifdef SDKROOT
@@ -72,13 +72,13 @@
OBJS = $(C_SRCS:%.c=$(OBJROOT)/%.o) $(CXX_SRCS:%.cpp=$(OBJROOT)/%.o) $(ASM_SRCS:%.S=$(OBJROOT)/%.o)
$(OBJROOT)/%.o : %.c
- $(CC) $(ARC_FLAGS) $(SYSROOT_FLAGS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+ $(CC) $(ARCH_FLAGS) $(SYSROOT_FLAGS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
$(OBJROOT)/%.o : %.cpp
- $(CXX) $(ARC_FLAGS) $(SYSROOT_FLAGS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
+ $(CXX) $(ARCH_FLAGS) $(SYSROOT_FLAGS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
$(OBJROOT)/%.o : %.S
- $(CC) $(ARC_FLAGS) $(SYSROOT_FLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $<
+ $(CC) $(ARCH_FLAGS) -force_cpusubtype_ALL $(SYSROOT_FLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $<
$(OBJROOT)/$(LIBUNWIND_FILENAME): $(OBJS)
$(CXX) -o $@ $(ARC_FLAGS) $(SYSROOT_FLAGS) $(LDFLAGS) \
Added: trunk/dports/devel/libunwind/files/libunwind-ppc.patch
===================================================================
--- trunk/dports/devel/libunwind/files/libunwind-ppc.patch (rev 0)
+++ trunk/dports/devel/libunwind/files/libunwind-ppc.patch 2015-01-11 21:53:36 UTC (rev 131415)
@@ -0,0 +1,26 @@
+--- src/Unwind/config.h.orig 2015-01-11 13:39:54.000000000 -0800
++++ src/Unwind/config.h 2015-01-11 13:43:38.000000000 -0800
+@@ -39,9 +39,9 @@
+ }
+ #endif
+
+- #define _LIBUNWIND_BUILD_ZERO_COST_APIS (__i386__ || __x86_64__ || __arm64__)
++ #define _LIBUNWIND_BUILD_ZERO_COST_APIS (__ppc__ || __ppc64__ || __i386__ || __x86_64__ || __arm64__)
+ #define _LIBUNWIND_BUILD_SJLJ_APIS (__arm__)
+- #define _LIBUNWIND_SUPPORT_FRAME_APIS (__i386__ || __x86_64__)
++ #define _LIBUNWIND_SUPPORT_FRAME_APIS (__ppc__ || __ppc64__ || __i386__ || __x86_64__)
+ #define _LIBUNWIND_EXPORT __attribute__((visibility("default")))
+ #define _LIBUNWIND_HIDDEN __attribute__((visibility("hidden")))
+ #define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, __VA_ARGS__)
+@@ -67,9 +67,9 @@
+ abort();
+ }
+
+- #define _LIBUNWIND_BUILD_ZERO_COST_APIS (__i386__ || __x86_64__ || __arm64__ || __arm__)
++ #define _LIBUNWIND_BUILD_ZERO_COST_APIS (__ppc__ || __ppc64__ || __i386__ || __x86_64__ || __arm64__ || __arm__)
+ #define _LIBUNWIND_BUILD_SJLJ_APIS 0
+- #define _LIBUNWIND_SUPPORT_FRAME_APIS (__i386__ || __x86_64__)
++ #define _LIBUNWIND_SUPPORT_FRAME_APIS (__ppc__ || __ppc64__ || __i386__ || __x86_64__)
+ #define _LIBUNWIND_EXPORT __attribute__((visibility("default")))
+ #define _LIBUNWIND_HIDDEN __attribute__((visibility("hidden")))
+ #define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, __VA_ARGS__)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150111/4f118cd0/attachment.html>
More information about the macports-changes
mailing list