Hi Segher,
On 2020/3/6 下午11:25, Segher Boessenkool wrote:
Hi!
On Fri, Mar 06, 2020 at 10:20:08AM +0800, binbin wrote:
OK, changed the code. Bootstrap and regression tests were done on
powerpc64le-linux-gnu (LE) with no regressions. Thanks for your suggestion.
Yes, this is fine, approved for trunk (but add a changelog!)
And one triviality:
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -2494,6 +2494,9 @@ extern GTY(()) tree
builtin_mode_to_type[MAX_MACHINE_MODE][2];
extern GTY(()) tree altivec_builtin_mask_for_load;
#ifndef USED_FOR_TARGET
+
+extern GTY(()) section *toc_section;
No empty line before this please?
Thanks!
Segher
OK, removed the empty line and showed the changelog. And I found that the
declaration in rs6000-internal.h should also be removed, right? The
attachment is the latest patch. Thanks.
gcc/ChangeLog
2020-03-09 Bin Bin Lv <s...@linux.ibm.com>
* config/rs6000/rs6000-internal.h (toc_section): Remove the declaration.
* config/rs6000/rs6000.h (toc_section): Add the declaration.
* config/rs6000/rs6000.c (toc_section): Remove the declaration.
---
diff --git a/gcc/config/rs6000/rs6000-internal.h
b/gcc/config/rs6000/rs6000-internal.h
index d331b9e..9caef01 100644
--- a/gcc/config/rs6000/rs6000-internal.h
+++ b/gcc/config/rs6000/rs6000-internal.h
@@ -64,7 +64,6 @@ typedef struct rs6000_stack {
extern int need_toc_init;
extern char toc_label_name[10];
extern int rs6000_pic_labelno;
-extern section *toc_section;
#ifdef USING_ELFOS_H
extern const char *rs6000_machine;
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 0faf44b..c0a6e86 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -181,7 +181,6 @@ static GTY(()) section *tls_private_data_section;
static GTY(()) section *read_only_private_data_section;
static GTY(()) section *sdata2_section;
-extern GTY(()) section *toc_section;
section *toc_section = 0;
/* Describe the vector unit used for modes. */
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 724085b..8595b43 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -2492,6 +2492,7 @@ extern GTY(()) tree
rs6000_builtin_decls[RS6000_BUILTIN_COUNT];
#ifndef USED_FOR_TARGET
+extern GTY(()) section *toc_section;
/* A C structure for machine-specific, per-function data.
This is added to the cfun structure. */
typedef struct GTY(()) machine_function