sdcc 4.5.0

This commit is contained in:
PulkoMandy
2025-02-17 08:10:28 +01:00
parent 4829fb0fed
commit f46ad5e032
2 changed files with 54 additions and 69 deletions

View File

@@ -1,11 +1,11 @@
From f8949dbbebbe12300de6dea265f1f9bd74e7bb5c Mon Sep 17 00:00:00 2001
From 079b4a09f07044aa75df6c3af49c497cdd4a3bff Mon Sep 17 00:00:00 2001
From: PulkoMandy <pulkomandy@pulkomandy.tk>
Date: Mon, 14 Aug 2023 17:10:50 +0200
Subject: Kevin Thacker's patch for generating relocatable executables
diff --git a/sdas/linksrc/Makefile.in b/sdas/linksrc/Makefile.in
index b7eb8fc..e392266 100644
index 77e61c5..7ebad99 100644
--- a/sdas/linksrc/Makefile.in
+++ b/sdas/linksrc/Makefile.in
@@ -47,7 +47,7 @@ ASXXLIBSRC = strcmpi.c
@@ -17,35 +17,6 @@ index b7eb8fc..e392266 100644
LKSOURCES = $(SRC) $(ASXXLIBSRC:%.c=$(ASXXLIB)/%.c)
@@ -87,28 +87,22 @@ $(ASLINK): $(LKOBJECTS)
# ----------------------------------------------------
install: all installdirs
$(INSTALL) $(top_builddir)/bin/sdld$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdld' | sed '$(transform)'`$(EXEEXT)
- $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdld' | sed '$(transform)'`$(EXEEXT)
if [ "`grep stm8 $(top_builddir)/ports.build`" = "stm8" ]; \
then \
$(INSTALL) $(top_builddir)/bin/sdldstm8$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdldstm8' | sed '$(transform)'`$(EXEEXT); \
- $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdldstm8' | sed '$(transform)'`$(EXEEXT); \
fi
if [ "`grep hc08 $(top_builddir)/ports.build`" = "hc08" ]; \
then \
$(INSTALL) $(top_builddir)/bin/sdld6808$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdld6808' | sed '$(transform)'`$(EXEEXT); \
- $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdld6808' | sed '$(transform)'`$(EXEEXT); \
fi
if [ "`grep z80 $(top_builddir)/ports.build`" = "z80" ]; \
then \
$(INSTALL) $(top_builddir)/bin/sdldz80$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdldz80' | sed '$(transform)'`$(EXEEXT); \
- $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdldz80' | sed '$(transform)'`$(EXEEXT); \
$(INSTALL) $(top_builddir)/bin/sdldgb$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdldgb' | sed '$(transform)'`$(EXEEXT); \
- $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdldgb' | sed '$(transform)'`$(EXEEXT); \
fi
if [ "`grep pdk $(top_builddir)/ports.build`" = "pdk" ]; \
then \
$(INSTALL) $(top_builddir)/bin/sdldpdk$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdldpdk' | sed '$(transform)'`$(EXEEXT); \
- $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdldpdk' | sed '$(transform)'`$(EXEEXT); \
fi
# Deleting all the installed files
diff --git a/sdas/linksrc/aslink.h b/sdas/linksrc/aslink.h
index 4033cfa..f2d944c 100644
--- a/sdas/linksrc/aslink.h
@@ -540,7 +511,7 @@ index 0000000..ca1cfd4
2.45.2
From b53a9d88ff501567af124bf82dd5ccbb1aa02cae Mon Sep 17 00:00:00 2001
From ed12635bd6b1a13942c1936a98c66d444a4b99fe Mon Sep 17 00:00:00 2001
From: PulkoMandy <pulkomandy@pulkomandy.tk>
Date: Mon, 14 Aug 2023 17:11:04 +0200
Subject: Port changes from SDCC 4.2.0 patchset
@@ -550,7 +521,7 @@ upstream binutils, but some remain in the toplevel directories which are
not shared with binutils.
diff --git a/configure.ac b/configure.ac
index adf5060..1d3878d 100644
index 391c4de..fa403ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -390,10 +390,10 @@ if test "$ac_cv_c_compiler_gnu" = "yes"; then
@@ -584,7 +555,7 @@ index 84840bf..f7fe2e6 100644
2.45.2
From 3e807960998c6fa19b65bd8ef2285c36f5c0a059 Mon Sep 17 00:00:00 2001
From 5d456bf45287e3f8e827670c5e14678787df314f Mon Sep 17 00:00:00 2001
From: PulkoMandy <pulkomandy@pulkomandy.tk>
Date: Mon, 14 Aug 2023 23:12:39 +0200
Subject: Remove no-PIE options
@@ -717,7 +688,7 @@ index e5aad31..275e1c1 100644
2.45.2
From f8c5010ba6564651fe121321ac4dacea8a769ba9 Mon Sep 17 00:00:00 2001
From e1c38687408a9382627e04fe06e951a9f218712d Mon Sep 17 00:00:00 2001
From: PulkoMandy <pulkomandy@pulkomandy.tk>
Date: Wed, 16 Aug 2023 12:14:44 +0200
Subject: More Haiku support patches
@@ -903,38 +874,51 @@ index 0000000..5b22f3b
2.45.2
From 3916bb42cdd25ac3ac9ce09214bdac2b18e5eb42 Mon Sep 17 00:00:00 2001
From 111aa80e519b11c1edd9903678c92a65bea6db7d Mon Sep 17 00:00:00 2001
From: PulkoMandy <pulkomandy@pulkomandy.tk>
Date: Mon, 30 Sep 2024 08:18:33 +0200
Subject: Backport fix from https://sourceforge.net/p/sdcc/code/14821/
Date: Mon, 30 Sep 2024 21:03:07 +0200
Subject: Do not strip executables when installing
We want the debug info in a debug info package
diff --git a/src/z80/gen.c b/src/z80/gen.c
index 63ba67a..7e6166c 100644
--- a/src/z80/gen.c
+++ b/src/z80/gen.c
@@ -4744,7 +4744,11 @@ genMove_o (asmop *result, int roffset, asmop *source, int soffset, int size, boo
}
else if (source->type == AOP_STL)
{
- if (i || soffset || !hl_dead)
+ if (!hl_dead && (result->regs[L_IDX] > roffset || result->regs[H_IDX] > roffset))
+ UNIMPLEMENTED;
+ if (!hl_dead)
+ _push (PAIR_HL);
+ if (i || soffset)
UNIMPLEMENTED;
if (!f_dead)
_push (PAIR_AF);
@@ -4756,6 +4760,8 @@ genMove_o (asmop *result, int roffset, asmop *source, int soffset, int size, boo
_pop (PAIR_AF);
spillPair (PAIR_HL);
genMove_o (result, roffset, ASMOP_HL, 0, size, a_dead, true, de_dead_global, iy_dead, f_dead);
+ if (!hl_dead)
+ _pop (PAIR_HL);
i += 2;
continue;
}
diff --git a/sdas/linksrc/Makefile.in b/sdas/linksrc/Makefile.in
index 7ebad99..1c151b9 100644
--- a/sdas/linksrc/Makefile.in
+++ b/sdas/linksrc/Makefile.in
@@ -89,33 +89,26 @@ $(ASLINK): $(LKOBJECTS)
# ----------------------------------------------------
install: all installdirs
$(INSTALL) $(top_builddir)/bin/sdld$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdld' | sed '$(transform)'`$(EXEEXT)
- $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdld' | sed '$(transform)'`$(EXEEXT)
if [ "`grep stm8 $(top_builddir)/ports.build`" = "stm8" ]; \
then \
$(INSTALL) $(top_builddir)/bin/sdldstm8$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdldstm8' | sed '$(transform)'`$(EXEEXT); \
- $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdldstm8' | sed '$(transform)'`$(EXEEXT); \
fi
if [ "`grep hc08 $(top_builddir)/ports.build`" = "hc08" ]; \
then \
$(INSTALL) $(top_builddir)/bin/sdld6808$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdld6808' | sed '$(transform)'`$(EXEEXT); \
- $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdld6808' | sed '$(transform)'`$(EXEEXT); \
fi
if [ "`grep z80 $(top_builddir)/ports.build`" = "z80" ]; \
then \
$(INSTALL) $(top_builddir)/bin/sdldz80$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdldz80' | sed '$(transform)'`$(EXEEXT); \
- $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdldz80' | sed '$(transform)'`$(EXEEXT); \
$(INSTALL) $(top_builddir)/bin/sdldgb$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdldgb' | sed '$(transform)'`$(EXEEXT); \
- $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdldgb' | sed '$(transform)'`$(EXEEXT); \
fi
if [ "`grep pdk $(top_builddir)/ports.build`" = "pdk" ]; \
then \
$(INSTALL) $(top_builddir)/bin/sdldpdk$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdldpdk' | sed '$(transform)'`$(EXEEXT); \
- $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdldpdk' | sed '$(transform)'`$(EXEEXT); \
fi
if [ "`grep f8 $(top_builddir)/ports.build`" = "f8" ]; \
then \
$(INSTALL) $(top_builddir)/bin/sdldf8$(EXEEXT) $(DESTDIR)$(bindir)/`echo 'sdldf8' | sed '$(transform)'`$(EXEEXT); \
- $(STRIP) $(DESTDIR)$(bindir)/`echo 'sdldf8' | sed '$(transform)'`$(EXEEXT); \
fi
# Deleting all the installed files
--
2.45.2

View File

@@ -7,13 +7,13 @@ Rabbit 3000A, TLCS-90) and STMicroelectronics STM8. Work is in progress on \
supporting the Microchip PIC16 and PIC18 targets. It can be retargeted for \
other microprocessors."
HOMEPAGE="http://sdcc.sourceforge.net"
COPYRIGHT="1999-2023 Sandeep Dutta"
COPYRIGHT="1999-2024 Sandeep Dutta"
LICENSE="GNU GPL v2"
REVISION="3"
REVISION="1"
SOURCE_URI="http://sourceforge.net/projects/sdcc/files/sdcc/$portVersion/sdcc-src-$portVersion.tar.bz2"
SOURCE_DIR="sdcc-$portVersion"
PATCHES="sdcc-$portVersion.patchset"
CHECKSUM_SHA256="ae8c12165eb17680dff44b328d8879996306b7241efa3a83b2e3b2d2f7906a75"
CHECKSUM_SHA256="d5030437fb436bb1d93a8dbdbfb46baaa60613318f4fb3f5871d72815d1eed80"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
@@ -29,6 +29,7 @@ PROVIDES="
cmd:sdas6500
cmd:sdas6808
cmd:sdas8051
cmd:sdasf8
cmd:sdasgb
cmd:sdaspdk13
cmd:sdaspdk14
@@ -45,6 +46,7 @@ PROVIDES="
cmd:sdcpp
cmd:sdld
cmd:sdld6808
cmd:sdldf8
cmd:sdldgb
cmd:sdldpdk
cmd:sdldstm8
@@ -53,8 +55,8 @@ PROVIDES="
cmd:sdobjcopy
cmd:sdranlib
cmd:ucsim_51
cmd:ucsim_avr
cmd:ucsim_f8
cmd:ucsim_i8051
cmd:ucsim_m68hc08
cmd:ucsim_mos6502
cmd:ucsim_pdk
@@ -123,7 +125,6 @@ defineDebugInfoPackage sdcc$secondaryArchSuffix \
$prefix/bin/sdobjcopy \
$prefix/bin/sdranlib \
$prefix/bin/ucsim_51 \
$prefix/bin/ucsim_avr \
$prefix/bin/ucsim_f8 \
$prefix/bin/ucsim_m68hc08 \
$prefix/bin/ucsim_mos6502 \