1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

Fix build with clang 3 (10-STABLE) and clang 6 (12-CURRENT) compilers.

Add option (default ON) to create version-independend symlink for Arduino IDE.
This commit is contained in:
Lev A. Serebryakov 2018-01-25 14:01:37 +00:00
parent 860708a57a
commit ee1cdeab01
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=459944
8 changed files with 77 additions and 4 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= gcc-arm-embedded
PORTVERSION= 7.2.20171218
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= devel
MASTER_SITES= https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4/
DISTNAME= ${ORIGINAL_PACKAGE_NAME}-src
@ -15,11 +15,12 @@ LICENSE_COMB= multi
BROKEN_powerpc64= does not build: __adjust.c: internal compiler error: Segmentation fault
OPTIONS_DEFINE= PYGDB EXAMPLES HTML PDF DOCS
OPTIONS_DEFAULT=PYGDB
OPTIONS_DEFINE= PYGDB EXAMPLES HTML PDF DOCS SYMLINK
OPTIONS_DEFAULT=PYGDB SYMLINK
HTML_DESC= Install HTML documentation
PDF_DESC= Install PDF documentation (requires TeX, it is huge)
PYGDB_DESC= Build and install python-enabled gdb in addition to standard one
SYMLINK_DESC= Make version-independed symlink ${LOCALBASE}/${PORTNAME}
PDF_USE= TEX=base:build,tex:build,dvipsk:build
PDF_BUILD_DEPENDS= texi2dvi:print/texinfo
@ -121,5 +122,8 @@ do-build:
do-install:
@${TAR} -cf - -C ${WRKDIR}/install ${PORTNAME}-${FULL_VERSION} | ${TAR} -xf - -C ${STAGEDIR}${PREFIX}
.if ${PORT_OPTIONS:MSYMLINK}
@${LN} -s ${PORTNAME}-${FULL_VERSION} ${STAGEDIR}${PREFIX}/${PORTNAME}
.endif
.include <bsd.port.post.mk>

View File

@ -13,7 +13,7 @@ WORLD_LIB=${LOCALBASE}
LDFLAGS+= -L${WORLD_LIB}/lib
.if ${CHOSEN_COMPILER_TYPE} == clang
MAKE_ARGS+= CFLAGS="-Wno-error -fbracket-depth=512" CXXFLAGS="-Wno-error -fbracket-depth=512"
MAKE_ARGS+= CFLAGS="-Wno-error -fbracket-depth=512 -Wno-deprecated-register" CXXFLAGS="-Wno-error -fbracket-depth=512 -Wno-deprecated-register"
.endif
MISC_DOCS= license.txt readme.txt release.txt

View File

@ -0,0 +1,15 @@
--- src/gdb/gdb/common/diagnostics.h.orig 2017-06-28 22:30:08.000000000 +0300
+++ src/gdb/gdb/common/diagnostics.h 2018-01-24 17:11:46.847340000 +0300
@@ -33,7 +33,11 @@
#if defined (__clang__) /* clang */
-# define DIAGNOSTIC_IGNORE_SELF_MOVE DIAGNOSTIC_IGNORE ("-Wself-move")
+# if __has_warning("-Wself-move")
+# define DIAGNOSTIC_IGNORE_SELF_MOVE DIAGNOSTIC_IGNORE ("-Wself-move")
+# else
+# define DIAGNOSTIC_IGNORE_SELF_MOVE
+# endif
# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER \
DIAGNOSTIC_IGNORE ("-Wdeprecated-register")
# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \

View File

@ -0,0 +1,11 @@
--- src/gdb/gdb/dtrace-probe.c.orig 2018-01-23 21:30:27.712651000 +0300
+++ src/gdb/gdb/dtrace-probe.c 2018-01-23 21:30:46.183643000 +0300
@@ -77,6 +77,8 @@
class dtrace_static_probe_ops : public static_probe_ops
{
public:
+ dtrace_static_probe_ops() {}
+
/* See probe.h. */
bool is_linespec (const char **linespecp) const override;

View File

@ -0,0 +1,20 @@
--- src/gdb/gdb/dwarf2read.c.orig 2018-01-25 13:10:17.113384000 +0300
+++ src/gdb/gdb/dwarf2read.c 2018-01-25 13:11:33.355566000 +0300
@@ -23105,7 +23105,7 @@
}
break;
- case DW_MACINFO_vendor_ext:
+ case DW_MACRO_hi_user:
if (!section_is_gnu)
{
unsigned int bytes_read;
@@ -23281,7 +23281,7 @@
mac_ptr += offset_size;
break;
- case DW_MACINFO_vendor_ext:
+ case DW_MACRO_hi_user:
/* Only skip the data by MAC_PTR. */
if (!section_is_gnu)
{

View File

@ -0,0 +1,11 @@
--- src/gdb/gdb/probe.c.orig 2018-01-24 19:30:20.436713000 +0300
+++ src/gdb/gdb/probe.c 2018-01-24 19:30:41.659782000 +0300
@@ -43,6 +43,8 @@
class any_static_probe_ops : public static_probe_ops
{
public:
+ any_static_probe_ops() {}
+
/* See probe.h. */
bool is_linespec (const char **linespecp) const override;

View File

@ -0,0 +1,11 @@
--- src/gdb/gdb/stap-probe.c.orig 2018-01-23 18:50:38.886661000 +0300
+++ src/gdb/gdb/stap-probe.c 2018-01-23 18:51:08.013663000 +0300
@@ -102,6 +102,8 @@
class stap_static_probe_ops : public static_probe_ops
{
public:
+ stap_static_probe_ops() {}
+
/* See probe.h. */
bool is_linespec (const char **linespecp) const override;

View File

@ -1,3 +1,4 @@
%%SYMLINK%%gcc-arm-embedded
gcc-arm-embedded-%%FULL_VERSION%%/%%TARGET%%/bin/ar
gcc-arm-embedded-%%FULL_VERSION%%/%%TARGET%%/bin/as
gcc-arm-embedded-%%FULL_VERSION%%/%%TARGET%%/bin/ld