fix gnustep-objc on illumos

This commit is contained in:
wiedi 2016-11-16 22:46:48 +00:00
parent 0788519496
commit 4a21794b3e
4 changed files with 46 additions and 12 deletions

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.27 2015/04/18 07:23:18 manu Exp $
# $NetBSD: Makefile,v 1.28 2016/11/16 22:46:48 wiedi Exp $
DISTNAME= libobjc2-1.6.1
PKGNAME= ${DISTNAME:S/libobjc2/gnustep-objc/}
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= devel gnustep
MASTER_SITES= http://download.gna.org/gnustep/
EXTRACT_SUFX= .tar.bz2
@ -19,6 +19,8 @@ MAKE_ENV+= ADDITIONAL_LDFLAGS=-lpthread
GNUSTEP_OVERRIDE_INSTALL= YES
NO_CONFIGURE= YES
.include "../../mk/compiler.mk"
.include "../../devel/gnustep-make/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.10 2015/11/03 03:27:29 agc Exp $
$NetBSD: distinfo,v 1.11 2016/11/16 22:46:48 wiedi Exp $
SHA1 (libobjc2-1.6.1.tar.bz2) = 02a6cf02f620530ecd64f32dca348def92412b2b
RMD160 (libobjc2-1.6.1.tar.bz2) = 7babdba063d5377125ffd5b9481e074c32a8cf10
SHA512 (libobjc2-1.6.1.tar.bz2) = e43bf867ca734e76274826a222a10e9b603e085a9dd245912ee16603bb61e276fcd9388918f61aba7d0bded0c045bc9799f7e24b309d670d144175707662f9c8
Size (libobjc2-1.6.1.tar.bz2) = 116263 bytes
SHA1 (patch-objc_msgSend.x86-32.S) = 381fe840c433864ea39858b0cf4af6af46790d06
SHA1 (patch-GNUmakefile) = 35524689235c4596c58e32eb38ad770d59e7d994
SHA1 (patch-objc_msgSend.x86-32.S) = ff1cc0247e5c2277f852f68addbe0bae4db82ba7

View file

@ -0,0 +1,34 @@
$NetBSD: patch-GNUmakefile,v 1.1 2016/11/16 22:46:49 wiedi Exp $
- only use -no-integrated-as with clang
- _XOPEN_SOURCE=500 conflicts with c99
--- GNUmakefile.orig 2012-03-21 16:45:31.000000000 +0000
+++ GNUmakefile
@@ -81,7 +81,7 @@ ${LIBOBJC}_OBJ_FILES = \
# Add rule for producing object files from assembler
$(GNUSTEP_OBJ_INSTANCE_DIR)/%.S$(OEXT) : %.S
- $(ECHO_COMPILING)$(CC) -no-integrated-as $< -c \
+ $(ECHO_COMPILING)$(CC) $(ASMFLAGS) $< -c \
$(filter-out $($<_FILE_FILTER_OUT_FLAGS),$(ALL_CPPFLAGS) \
$(ALL_CFLAGS)) \
$($<_FILE_FLAGS) -o $@$(END_ECHO)
@@ -153,7 +153,7 @@ endif
# we are special, precious, little flowers.
${LIBOBJC}_CPPFLAGS +=\
-D__OBJC_RUNTIME_INTERNAL__=1\
- -D_XOPEN_SOURCE=500\
+ -D_XOPEN_SOURCE=600\
-D__BSD_VISIBLE=1\
-D_BSD_SOURCE=1\
@@ -164,6 +164,8 @@ ${LIBOBJC}_CFLAGS += -std=gnu99 -g -fexc
${LIBOBJC}_CCFLAGS += -std=c++98 -g -fexceptions #-fvisibility=hidden
${LIBOBJC}_CFLAGS += -Wno-unused-function
+ASMFLAGS += `if $(CC) -v 2>&1| grep -q 'clang' ; then echo -no-integrated-as ; fi`
+
# Uncomment this when debugging - it makes everything slow, but means that the
# debugger actually works...
ifeq ($(debug), yes)

View file

@ -1,12 +1,11 @@
$NetBSD: patch-objc_msgSend.x86-32.S,v 1.1 2015/04/18 07:23:18 manu Exp $
$NetBSD: patch-objc_msgSend.x86-32.S,v 1.2 2016/11/16 22:46:49 wiedi Exp $
Depending on the compiler, __i686.get_pc_thunk.bx may be missing
from runtime. Replace it by a localy supplied version.
--- objc_msgSend.x86-32.S.orig 2015-04-17 09:44:49.000000000 +0000
+++ objc_msgSend.x86-32.S 2015-04-17 09:47:40.000000000 +0000
@@ -77,9 +77,9 @@
--- objc_msgSend.x86-32.S.orig 2012-05-04 13:28:08.000000000 +0000
+++ objc_msgSend.x86-32.S
@@ -78,7 +78,7 @@
jmp *%eax
6: # smallObject:
push %ebx # Save old %ebx
@ -15,9 +14,7 @@ from runtime. Replace it by a localy supplied version.
addl $_GLOBAL_OFFSET_TABLE_, %ebx
mov SmallObjectClasses@GOT(%ebx), %eax
mov (%eax), %eax
popl %ebx
@@ -97,4 +97,7 @@
.globl objc_msgSend_stret
@@ -98,3 +98,6 @@ objc_msgSend:
.type objc_msgSend_stret, @function
objc_msgSend_stret:
MSGSEND 8, 12, 0