Skip to content

Commit

Permalink
Ports: Remove/replace hardcoded i686-pc-serenity-{gcc,g++,ar,ranlib}
Browse files Browse the repository at this point in the history
Except in the Lua port's Makefile patch, I couldn't figure this out...
  • Loading branch information
linusg authored and awesomekling committed Mar 13, 2021
1 parent f9cf6bf commit 7cb9237
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions Ports/.port_include.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export SERENITY_ARCH=i686
export SERENITY_BUILD_DIR="${SERENITY_ROOT}/Build/${SERENITY_ARCH}"
export CC=i686-pc-serenity-gcc
export CXX=i686-pc-serenity-g++
export AR=i686-pc-serenity-ar
export RANLIB=i686-pc-serenity-ranlib
export PATH=$SERENITY_ROOT/Toolchain/Local/i686/bin:$PATH

packagesdb="${SERENITY_BUILD_DIR}/packages.db"
Expand Down
2 changes: 1 addition & 1 deletion Ports/dmidecode/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ auth_opts="--keyring ./gnu-keyring.gpg dmidecode-${version}.tar.xz.sig"

install() {
run make clean
run make CC=i686-pc-serenity-gcc
run make
}

post_install() {
Expand Down
2 changes: 1 addition & 1 deletion Ports/ed/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ useconfigure=true
depends=pcre2

configure() {
run ./"$configscript" CC=i686-pc-serenity-gcc
run ./"$configscript"
}
2 changes: 1 addition & 1 deletion Ports/figlet/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
port=figlet
version=2.2.5
files="https://ftp.figlet.org/pub/figlet/program/unix/figlet-${version}.tar.gz figlet-${version}.tar.gz d88cb33a14f1469fff975d021ae2858e"
makeopts="CC=i686-pc-serenity-gcc LD=i686-pc-serenity-gcc"
makeopts="CC=${CC} LD=${CC}"
2 changes: 1 addition & 1 deletion Ports/klong/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ port=klong
version=20190926
files="https://t3x.org/klong/klong20190926.tgz klong20190926.tgz"
useconfigure=false
workdir=klong
klong
2 changes: 1 addition & 1 deletion Ports/klong/patches/klong.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@@ -1,12 +1,12 @@
CFLAGS= -g -Wall -pedantic -O3
-CC= cc $(CFLAGS)
+CC= i686-pc-serenity-gcc $(CFLAGS)
+CC:= $(CC) $(CFLAGS)
V= 20190330
R= 20190926

Expand Down
3 changes: 2 additions & 1 deletion Ports/lua/patches/lua.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ diff -Naur lua-5.3.5/src/Makefile lua-5.3.5.serenity/src/Makefile

LUA_A= liblua.a
CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
@@ -124,6 +124,13 @@
@@ -124,6 +124,14 @@
solaris:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -D_REENTRANT" SYSLIBS="-ldl"

+serenity:
+ # FIXME: Replace these with $CC, $AR, $RANLIB
+ $(MAKE) $(ALL) \
+ CC="i686-pc-serenity-gcc -std=gnu99" \
+ AR="i686-pc-serenity-ar rcu" \
Expand Down
2 changes: 1 addition & 1 deletion Ports/ninja/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version=1.8.2
files="https://github.com/ninja-build/ninja/archive/v${version}.tar.gz ninja-v${version}.tar.gz"

build() {
CXX=i686-pc-serenity-g++ CXXFLAGS="--sysroot=${SERENITY_BUILD_DIR}/Root" \
CXXFLAGS="--sysroot=${SERENITY_BUILD_DIR}/Root" \
LDFLAGS="--sysroot=${SERENITY_BUILD_DIR}/Root" \
# platform=linux is close enough.
run ./configure.py --bootstrap --platform=linux
Expand Down
2 changes: 1 addition & 1 deletion Ports/tinyscheme/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ files="https://downloads.sourceforge.net/project/tinyscheme/tinyscheme/tinyschem
useconfigure=false

build() {
run make scheme CC="i686-pc-serenity-gcc -fpic -pedantic" SYS_LIBS= FEATURES='-DUSE_NO_FEATURES=1 -DInitFile=\"/usr/local/include/tinyscheme/init.scm\"'
run make scheme CC="${CC} -fpic -pedantic" SYS_LIBS= FEATURES='-DUSE_NO_FEATURES=1 -DInitFile=\"/usr/local/include/tinyscheme/init.scm\"'
}

install() {
Expand Down

0 comments on commit 7cb9237

Please sign in to comment.