mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
gcc: default to strict dwarf4
This commit is contained in:
@@ -5,7 +5,7 @@ HOMEPAGE="https://gcc.gnu.org/"
|
||||
COPYRIGHT="1988-2019 Free Software Foundation, Inc."
|
||||
LICENSE="GNU GPL v3
|
||||
GNU LGPL v3"
|
||||
REVISION="9"
|
||||
REVISION="10"
|
||||
gccVersion="${portVersion%%_*}"
|
||||
SOURCE_URI="https://ftpmirror.gnu.org/gcc/gcc-$gccVersion/gcc-$gccVersion.tar.xz
|
||||
https://ftp.gnu.org/gnu/gcc/gcc-$gccVersion/gcc-$gccVersion.tar.xz"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 9ed355050e6efbb3f355c75614bbd3fad5875373 Mon Sep 17 00:00:00 2001
|
||||
From ccfbde91d738799ffb2f535d7dbc893533749ddb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com>
|
||||
Date: Sun, 19 Jul 2015 18:55:34 +0200
|
||||
Subject: Haiku patch
|
||||
@@ -2400,10 +2400,10 @@ index 24d13f3..94d96d9 100644
|
||||
|
||||
hpux*)
|
||||
--
|
||||
2.21.0
|
||||
2.30.0
|
||||
|
||||
|
||||
From db7fda79169a0c34eccfb4e59494f909fb4f1682 Mon Sep 17 00:00:00 2001
|
||||
From 688e92eb24c0282034325fe65350e7b440ee4c37 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com>
|
||||
Date: Mon, 27 Jul 2015 16:32:32 +0200
|
||||
Subject: Haiku: disable -fno-PIE as this fails on x86_64.
|
||||
@@ -2436,10 +2436,10 @@ index f42df7e..74d3ef4 100644
|
||||
# Native compiler that we use. This may be C++ some day.
|
||||
COMPILER_FOR_BUILD = $(CXX_FOR_BUILD)
|
||||
--
|
||||
2.21.0
|
||||
2.30.0
|
||||
|
||||
|
||||
From 1a310e23661d1ca4eebcda4bbe7355f608d56015 Mon Sep 17 00:00:00 2001
|
||||
From da21b53378f59fc7faeec35d15f941d8fb9feb12 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Thu, 5 May 2016 09:03:06 +0000
|
||||
Subject: fix for libstdc++/69506
|
||||
@@ -2458,10 +2458,10 @@ index 4674f7b..02c8693 100644
|
||||
+
|
||||
#endif
|
||||
--
|
||||
2.21.0
|
||||
2.30.0
|
||||
|
||||
|
||||
From eec59d0c39df43d09e4e90346d5568229b2fc453 Mon Sep 17 00:00:00 2001
|
||||
From 61ab802b1e700d349d010dc96efad263d425b6fc Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Thu, 5 May 2016 15:52:08 +0000
|
||||
Subject: rename x86_elf_aligned_common.
|
||||
@@ -2485,10 +2485,10 @@ index 76ba48e..e2fa55a 100644
|
||||
|
||||
/* i386 System V Release 4 uses DWARF debugging info.
|
||||
--
|
||||
2.21.0
|
||||
2.30.0
|
||||
|
||||
|
||||
From f749815a6f04c090366533e42273f6572ea9d94d Mon Sep 17 00:00:00 2001
|
||||
From c90935efebcf4b34d8c692c73d2898a0d912e1bf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Wed, 2 May 2018 08:37:20 +0200
|
||||
Subject: Enable libstdcxx_filesystem_ts for Haiku
|
||||
@@ -2509,10 +2509,10 @@ index 4f37b6a..7d8fd79 100644
|
||||
enable_libstdcxx_filesystem_ts=no
|
||||
;;
|
||||
--
|
||||
2.21.0
|
||||
2.30.0
|
||||
|
||||
|
||||
From d067b5a492216daa2d6888017a865cb0fbf6982f Mon Sep 17 00:00:00 2001
|
||||
From afc82be3b935625c5478dbc721681784ff951786 Mon Sep 17 00:00:00 2001
|
||||
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
|
||||
Date: Fri, 12 Jul 2019 18:17:00 +0000
|
||||
Subject: gcc: fix build configuration for libgcc.
|
||||
@@ -2534,10 +2534,10 @@ index 26d080a..bdc2b1c 100644
|
||||
;;
|
||||
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
|
||||
--
|
||||
2.21.0
|
||||
2.30.0
|
||||
|
||||
|
||||
From 8358539b6cfa67c39a79c027011bf5af3ef5ee96 Mon Sep 17 00:00:00 2001
|
||||
From 4e1342f09acbecaf94f11510717151b5ce2e3f4e Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 12 May 2017 23:49:00 +0200
|
||||
Subject: Haiku: regenerate configure.
|
||||
@@ -3284,5 +3284,126 @@ index 5535bfa..aa15c92 100755
|
||||
enable_libstdcxx_filesystem_ts=no
|
||||
;;
|
||||
--
|
||||
2.21.0
|
||||
2.30.0
|
||||
|
||||
|
||||
From 65f049fc544f2adf3f0a44f5486e3b7199d2bd83 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Thu, 6 May 2021 19:15:37 +0200
|
||||
Subject: Haiku: default to strict Dwarf4
|
||||
|
||||
Haiku Debugger doesn't support Dwarf5.
|
||||
|
||||
diff --git a/gcc/config.gcc b/gcc/config.gcc
|
||||
index 07863ce..c851f93 100644
|
||||
--- a/gcc/config.gcc
|
||||
+++ b/gcc/config.gcc
|
||||
@@ -759,6 +759,8 @@ case ${target} in
|
||||
"" | yes | posix) thread_file='posix' ;;
|
||||
esac
|
||||
default_use_cxa_atexit=yes
|
||||
+ tm_p_file="${tm_p_file} haiku-protos.h"
|
||||
+ extra_objs="${extra_objs} haiku.o"
|
||||
;;
|
||||
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
|
||||
extra_options="$extra_options gnu-user.opt"
|
||||
diff --git a/gcc/config/haiku-protos.h b/gcc/config/haiku-protos.h
|
||||
new file mode 100644
|
||||
index 0000000..22d8e59
|
||||
--- /dev/null
|
||||
+++ b/gcc/config/haiku-protos.h
|
||||
@@ -0,0 +1,21 @@
|
||||
+/* Operating system specific prototypes to be used when targeting GCC for Haiku.
|
||||
+ Copyright (C) 2021 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GCC.
|
||||
+
|
||||
+GCC is free software; you can redistribute it and/or modify
|
||||
+it under the terms of the GNU General Public License as published by
|
||||
+the Free Software Foundation; either version 3, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GCC is distributed in the hope that it will be useful,
|
||||
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+GNU General Public License for more details.
|
||||
+
|
||||
+You should have received a copy of the GNU General Public License
|
||||
+along with GCC; see the file COPYING3. If not see
|
||||
+<http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* In haiku.c. */
|
||||
+extern void haiku_override_options (void);
|
||||
diff --git a/gcc/config/haiku.c b/gcc/config/haiku.c
|
||||
new file mode 100644
|
||||
index 0000000..bf62ad5
|
||||
--- /dev/null
|
||||
+++ b/gcc/config/haiku.c
|
||||
@@ -0,0 +1,32 @@
|
||||
+/* General Haiku system support.
|
||||
+ Copyright (C) 2021 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GCC.
|
||||
+
|
||||
+GCC is free software; you can redistribute it and/or modify
|
||||
+it under the terms of the GNU General Public License as published by
|
||||
+the Free Software Foundation; either version 3, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GCC is distributed in the hope that it will be useful,
|
||||
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+GNU General Public License for more details.
|
||||
+
|
||||
+You should have received a copy of the GNU General Public License
|
||||
+along with GCC; see the file COPYING3. If not see
|
||||
+<http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include "config.h"
|
||||
+#include "system.h"
|
||||
+#include "coretypes.h"
|
||||
+#include "target.h"
|
||||
+
|
||||
+void
|
||||
+haiku_override_options (void)
|
||||
+{
|
||||
+ if (!global_options_set.x_dwarf_strict)
|
||||
+ dwarf_strict = 1;
|
||||
+ if (!global_options_set.x_dwarf_version)
|
||||
+ dwarf_version = 4;
|
||||
+}
|
||||
diff --git a/gcc/config/haiku.h b/gcc/config/haiku.h
|
||||
index 8e9f101..62e88cc 100644
|
||||
--- a/gcc/config/haiku.h
|
||||
+++ b/gcc/config/haiku.h
|
||||
@@ -53,6 +53,11 @@ Boston, MA 02111-1307, USA. */
|
||||
#undef CC1PLUS_SPEC
|
||||
#define CC1PLUS_SPEC "%{!Wctor-dtor-privacy:-Wno-ctor-dtor-privacy}"
|
||||
|
||||
+#define SUBTARGET_OVERRIDE_OPTIONS \
|
||||
+ do { \
|
||||
+ haiku_override_options (); \
|
||||
+ } while (0)
|
||||
+
|
||||
/* LIB_SPEC for Haiku */
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "-lroot"
|
||||
diff --git a/gcc/config/t-haiku b/gcc/config/t-haiku
|
||||
index 587d1fb..ba1f7f5 100644
|
||||
--- a/gcc/config/t-haiku
|
||||
+++ b/gcc/config/t-haiku
|
||||
@@ -1,4 +1,9 @@
|
||||
# There are system headers elsewhere, but these are the ones that
|
||||
# we are most likely to want to apply any fixes to.
|
||||
NATIVE_SYSTEM_HEADER_DIR = /boot/system/develop/headers
|
||||
-LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/posix/limits.h ]
|
||||
\ No newline at end of file
|
||||
+LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/posix/limits.h ]
|
||||
+
|
||||
+# Haiku-specific attributes
|
||||
+haiku.o: $(srcdir)/config/haiku.c
|
||||
+ $(COMPILE) $<
|
||||
+ $(POSTCOMPILE)
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user