Hi ports --

The attached works for me to re-enable lang/freebasic on i386. Can anyone else give this a spin?

~Brian

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/freebasic/Makefile,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 Makefile
--- Makefile	27 Oct 2017 20:41:47 -0000	1.2
+++ Makefile	28 Oct 2017 23:52:28 -0000
@@ -1,8 +1,6 @@
 # $OpenBSD: Makefile,v 1.2 2017/10/27 20:41:47 bcallah Exp $
 
-BROKEN-i386 =	bad bootstrap
-
-# All they seem to support.
+# May also support aarch64 and arm?
 ONLY_FOR_ARCHS =	amd64 i386
 
 V =		1.05.0
Index: patches/patch-makefile
===================================================================
RCS file: /cvs/ports/lang/freebasic/patches/patch-makefile,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 patch-makefile
--- patches/patch-makefile	23 Oct 2017 21:46:58 -0000	1.1.1.1
+++ patches/patch-makefile	28 Oct 2017 23:52:28 -0000
@@ -6,7 +6,17 @@ Keep tendrils here to make generating fu
 Index: makefile
 --- makefile.orig
 +++ makefile
-@@ -393,7 +393,8 @@ endif
+@@ -295,9 +295,7 @@ endif
+ # ENABLE_PIC for non-x86 Linux etc. (for every system where we need separate
+ # -fPIC versions of FB libs besides the normal ones)
+ ifneq ($(filter freebsd linux netbsd openbsd solaris,$(TARGET_OS)),)
+-  ifneq ($(TARGET_ARCH),x86)
+     ENABLE_PIC := YesPlease
+-  endif
+ endif
+ 
+ ifneq ($(filter cygwin dos win32,$(TARGET_OS)),)
+@@ -393,7 +391,8 @@ endif
  
  ALLFBCFLAGS += -e -m fbc -w pedantic
  ALLFBLFLAGS += -e -m fbc -w pedantic
@@ -16,7 +26,7 @@ Index: makefile
  
  ifeq ($(TARGET_OS),xbox)
    ifeq ($(OPENXDK),)
-@@ -1050,32 +1051,16 @@ FBBOOTSTRAPTITLE := $(FBSOURCETITLE)-bootstrap
+@@ -1050,32 +1049,16 @@ FBBOOTSTRAPTITLE := $(FBSOURCETITLE)-bootstrap
  bootstrap-dist:
  	# Precompile fbc sources for various targets
  	rm -rf bootstrap
@@ -55,7 +65,19 @@ Index: makefile
  #
  # Build the fbc[.exe] binary from the precompiled sources in the bootstrap/
  # directory.
-@@ -1098,6 +1083,7 @@ else
+@@ -1086,22 +1069,16 @@ bootstrap: rtlib gfxlib2 $(BOOTSTRAP_FBC)
+ 	mkdir -p bin
+ 	cp $(BOOTSTRAP_FBC) $(FBC_EXE)
+ 
+-ifeq ($(TARGET_ARCH),x86)
+-  # x86: .asm => .o (using the same assembler options as fbc)
+-  BOOTSTRAP_OBJ = $(patsubst %.asm,%.o,$(sort $(wildcard bootstrap/$(FBTARGET)/*.asm)))
+-  $(BOOTSTRAP_OBJ): %.o: %.asm
+-	$(QUIET_AS)$(AS) --strip-local-absolute $< -o $@
+-else
+   # x86_64 etc.: .c => .o (using the same gcc options as fbc -gen gcc)
+   BOOTSTRAP_CFLAGS := -nostdinc
+   BOOTSTRAP_CFLAGS += -Wall -Wno-unused-label -Wno-unused-function -Wno-unused-variable
    BOOTSTRAP_CFLAGS += -Wno-unused-but-set-variable -Wno-main
    BOOTSTRAP_CFLAGS += -fno-strict-aliasing -frounding-math
    BOOTSTRAP_CFLAGS += -Wfatal-errors
@@ -63,3 +85,7 @@ Index: makefile
    BOOTSTRAP_OBJ := $(patsubst %.c,%.o,$(sort $(wildcard bootstrap/$(FBTARGET)/*.c)))
    $(BOOTSTRAP_OBJ): %.o: %.c
  	$(QUIET_CC)$(CC) -c $(BOOTSTRAP_CFLAGS) $< -o $@
+-endif
+ 
+ # Use gcc to link fbc from the bootstrap .o's
+ # (assuming the rtlib was built already)

Reply via email to