Skip to content

Commit

Permalink
lang/sdcc: Fix build if binutils is installed
Browse files Browse the repository at this point in the history
binutils has ansidecls.h which gets picked up before the sdcc version
which breaks the build.  Patch the files which use it to use a relative
path.

PR:		273037
  • Loading branch information
DanielO authored and lwhsu committed Aug 15, 2023
1 parent fd4d7ae commit f565698
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lang/sdcc/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PORTNAME= sdcc
PORTVERSION= 4.0.0
DISTVERSIONPREFIX=src-
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= lang
MASTER_SITES= SF

Expand Down
11 changes: 11 additions & 0 deletions lang/sdcc/files/patch-support_sdbinutils_libiberty_objalloc.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- support/sdbinutils/libiberty/objalloc.c.orig 2018-03-18 17:46:53 UTC
+++ support/sdbinutils/libiberty/objalloc.c
@@ -18,7 +18,7 @@ Foundation, 51 Franklin Street - Fifth Floor,
Boston, MA 02110-1301, USA. */

#include "config.h"
-#include "ansidecl.h"
+#include "../include/ansidecl.h"

#include "objalloc.h"

11 changes: 11 additions & 0 deletions lang/sdcc/files/patch-support_sdbinutils_libiberty_spaces.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- support/sdbinutils/libiberty/spaces.c.orig 2018-03-18 17:46:53 UTC
+++ support/sdbinutils/libiberty/spaces.c
@@ -32,7 +32,7 @@ valid until at least the next call.
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include "ansidecl.h"
+#include "../include/ansidecl.h"
#include "libiberty.h"

#if VMS
11 changes: 11 additions & 0 deletions lang/sdcc/files/patch-support_sdbinutils_libiberty_xatexit.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- support/sdbinutils/libiberty/xatexit.c.orig 2012-02-10 10:16:50 UTC
+++ support/sdbinutils/libiberty/xatexit.c
@@ -25,7 +25,7 @@ failure. If you use @code{xatexit} to register functi
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include "ansidecl.h"
+#include "../include/ansidecl.h"
#include "libiberty.h"

#include <stdio.h>
11 changes: 11 additions & 0 deletions lang/sdcc/files/patch-support_sdbinutils_libiberty_xmalloc.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- support/sdbinutils/libiberty/xmalloc.c.orig 2018-03-18 17:46:53 UTC
+++ support/sdbinutils/libiberty/xmalloc.c
@@ -63,7 +63,7 @@ function will be called to print an error message and
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include "ansidecl.h"
+#include "../include/ansidecl.h"
#include "libiberty.h"
#include "environ.h"

11 changes: 11 additions & 0 deletions lang/sdcc/files/patch-support_sdbinutils_libiberty_xmemdup.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- support/sdbinutils/libiberty/xmemdup.c.orig 2018-03-18 17:46:53 UTC
+++ support/sdbinutils/libiberty/xmemdup.c
@@ -19,7 +19,7 @@ allocated, the remaining memory is zeroed.
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include "ansidecl.h"
+#include "../include/ansidecl.h"
#include "libiberty.h"

#include <sys/types.h> /* For size_t. */

0 comments on commit f565698

Please sign in to comment.