From c910f9651685c1e8f5c3141418c9d38d514d524e Mon Sep 17 00:00:00 2001 From: Roy Rankin Date: Feb 09 2019 02:43:51 +0000 Subject: upgrade 3.8.0 --- diff --git a/.gitignore b/.gitignore index 928289b..af32fdd 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /libboost1.60.patch /sdcc-src-3.6.0.tar.bz2 /sdcc-src-3.7.0.tar.bz2 +/sdcc-src-3.8.0.tar.bz2 diff --git a/sdcc-3.8.0-aligned_alloc.patch b/sdcc-3.8.0-aligned_alloc.patch new file mode 100644 index 0000000..f369fbf --- /dev/null +++ b/sdcc-3.8.0-aligned_alloc.patch @@ -0,0 +1,48 @@ +diff --git a/device/include/aligned_alloc.h b/device/include/aligned_alloc.h +new file mode 100644 +index 0000000..2cd5e3a +--- /dev/null ++++ b/device/include/aligned_alloc.h +@@ -0,0 +1,11 @@ ++#ifndef __SDCC_ALIGNED_ALLOC_H ++#define __SDCC_ALIGNED_ALLOC_H 1 ++ ++#if __STDC_VERSION__ >= 201112L ++inline void *aligned_alloc(size_t alignment, size_t size) ++{ ++ (void)alignment; ++ return malloc(size); ++} ++#endif ++#endif +diff --git a/device/include/stdlib.h b/device/include/stdlib.h +index 5abede0..cce0686 100644 +--- a/device/include/stdlib.h ++++ b/device/include/stdlib.h +@@ -82,6 +82,7 @@ void *calloc (size_t nmemb, size_t size); + void *malloc (size_t size); + void *realloc (void *ptr, size_t size); + #endif ++#ifdef RRR + #if __STDC_VERSION__ >= 201112L + inline void *aligned_alloc(size_t alignment, size_t size) + { +@@ -89,6 +90,7 @@ inline void *aligned_alloc(size_t alignment, size_t size) + return malloc(size); + } + #endif ++#endif + extern void free (void * ptr); + + /* Searching and sorting utilities (ISO C11 7.22.5) */ +diff --git a/device/lib/aligned_alloc.c b/device/lib/aligned_alloc.c +index 92f3259..552459b 100644 +--- a/device/lib/aligned_alloc.c ++++ b/device/lib/aligned_alloc.c +@@ -37,5 +37,5 @@ + + extern void *aligned_alloc(size_t alignment, size_t size); + +-#include ++#include + diff --git a/sdcc-3.8.0-python3.patch b/sdcc-3.8.0-python3.patch new file mode 100644 index 0000000..9d7a3db --- /dev/null +++ b/sdcc-3.8.0-python3.patch @@ -0,0 +1,10 @@ +diff --git a/support/scripts/as2gbmap.py b/support/scripts/as2gbmap.py +index 2ab5cde..193c878 100644 +--- a/support/scripts/as2gbmap.py ++++ b/support/scripts/as2gbmap.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # as2gbmap - asxxxx to gb map file converter + # diff --git a/sdcc.spec b/sdcc.spec index e5a4ba1..943ba9b 100644 --- a/sdcc.spec +++ b/sdcc.spec @@ -1,22 +1,24 @@ Name: sdcc -Version: 3.7.0 -Release: 2%{?dist} +Version: 3.8.0 +Release: 1%{?dist} Summary: Small Device C Compiler License: GPLv2+ URL: http://sdcc.sourceforge.net/ Source0: http://downloads.sourceforge.net/sdcc/sdcc-src-%{version}.tar.bz2 Source1: README.fedora +Patch1: sdcc-%{version}-python.patch +Patch2: sdcc-%{version}-aligned_alloc.patch BuildRequires: bison, gcc-c++, automake, libtool -BuildRequires: boost-devel +BuildRequires: boost-devel zlib-devel BuildRequires: flex Buildrequires: gputils BuildRequires: lyx BuildRequires: latex2html BuildRequires: tex(ulem.sty) -BuildRequires: texinfo texlive-xetex +BuildRequires: texinfo texlive-xetex texlive-footnotehyper # Work around to lyx-common missing R: /usr/bin/python -BuildRequires: /usr/bin/python +BuildRequires: /usr/bin/python2 Provides: bundled(libiberty) Requires: emacs-filesystem Obsoletes: emacs-sdcc <= 3.6.0 @@ -40,9 +42,11 @@ This package includes the sources for the C library, and is only necessary if you want to modify the C library or as reference of how it works. %prep -%setup -q -n sdcc +%setup -q -n sdcc-%{version} +#%setup -q -n sdcc find -name '*.{c,h,cc}' -exec chmod -x '{}' \; - +%patch1 -p1 +%patch2 -p1 # Disable brp-strip-static-archive for now because it errors trying to # strip foreign binaries. %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's#/usr/lib/rpm.*/brp-strip-static-archive .*##g') @@ -52,7 +56,7 @@ find -name '*.{c,h,cc}' -exec chmod -x '{}' \; # Preset PDFOPT to /bin/cp OPTS='PDFOPT="/bin/cp"' -%configure --enable-doc --disable-non-free STRIP=: ${OPTS} +%configure --enable-doc --disable-non-free STRIP=: ${OPTS} PYTHON=python3 %{__make} Q= QUIET= @@ -74,7 +78,6 @@ for x in ../libexec/sdcc/*; do echo "#!/bin/sh PATH=/usr/libexec/sdcc:\$PATH /usr/libexec/%{name}/$(basename $x) \"\$@\"" > %{name}-$(basename $x) -chmod 755 %{name}-$(basename $x) done popd @@ -102,6 +105,9 @@ popd %changelog +* Mon Feb 04 2019 Roy Rankin - 3.8.0-1 +- Upstream release, patch to use python3, patch for undefined _aligned_alloc + * Sat Feb 02 2019 Fedora Release Engineering - 3.7.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 3ac2e52..c685eed 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sdcc-src-3.7.0.tar.bz2) = f36a7471eb14dd03bd42b676f73c3aedb26831eede7bcbbff6c3875326ce6be350d963496b6c2104e1bd7db18926d6f78cb51e9bc14a5cc0121d4a6b7d28cc87 +SHA512 (sdcc-src-3.8.0.tar.bz2) = 38145ea3e9560eb8894c54bd7213da67a20163739c944c3247fa8fa456dfedaaa469746169d3e114affcab48b73db4cd8c9a0a367e7368f2471de64761a3e04a