Unable to build PowerPC AIX targets
Commit Message
Hi Rainer,
Building gas for AIX targeted PowerPC ports is currently failing
because the comment_chars array is now ELF only:
ld: app.o: in function `do_scrub_begin':
gas/app.c:216:(.text+0x55): undefined reference to `comment_chars'
I assume that there is no special need for the array to only be
defined for the ELF target, so I found that a patch like the one
attached solved the problem. Does this work for you ?
Cheers
Nick
Comments
Hi Nick,
> Building gas for AIX targeted PowerPC ports is currently failing
> because the comment_chars array is now ELF only:
>
> ld: app.o: in function `do_scrub_begin':
> gas/app.c:216:(.text+0x55): undefined reference to `comment_chars'
>
> I assume that there is no special need for the array to only be
> defined for the ELF target, so I found that a patch like the one
> attached solved the problem. Does this work for you ?
of course. Sorry for messing things up: I'd misread the nesting of
#ifdef's here and only tested on Linux/PowerPC.
Rainer
Hi Rainer,
>> I assume that there is no special need for the array to only be
>> defined for the ELF target, so I found that a patch like the one
>> attached solved the problem. Does this work for you ?
>
> of course. Sorry for messing things up: I'd misread the nesting of
> #ifdef's here and only tested on Linux/PowerPC.
No worries. I have checked in the patch.
Cheers
Nick
@@ -123,6 +123,10 @@ static void ppc_weak (int);
static void ppc_GNU_visibility (int);
#endif
+/* This string holds the chars that always start a comment. If the
+ pre-processor is disabled, these aren't very useful. */
+const char ppc_comment_chars[] = "#";
+
#ifdef OBJ_ELF
static void ppc_elf_rdata (int);
static void ppc_elf_lcomm (int);
@@ -134,10 +138,6 @@ static void ppc_elf_gnu_attribute (int);
/* Generic assembler global variables which must be defined by all
targets. */
-/* This string holds the chars that always start a comment. If the
- pre-processor is disabled, these aren't very useful. */
-const char ppc_comment_chars[] = "#";
-
/* Characters which start a comment at the beginning of a line. */
const char line_comment_chars[] = "#";
@@ -216,6 +216,9 @@ extern void ppc_new_dot_label (symbolS *);
extern const char ppc_symbol_chars[];
#define tc_symbol_chars ppc_symbol_chars
+#define tc_comment_chars ppc_comment_chars
+extern const char ppc_comment_chars[];
+
#ifdef OBJ_ELF
/* Support for SHT_ORDERED */
@@ -225,9 +228,6 @@ extern int ppc_section_flags (flagword, bfd_vma, int);
#define md_elf_section_type(STR, LEN) ppc_section_type (STR, LEN)
#define md_elf_section_flags(FLAGS, ATTR, TYPE) ppc_section_flags (FLAGS, ATTR, TYPE)
-#define tc_comment_chars ppc_comment_chars
-extern const char ppc_comment_chars[];
-
#define md_elf_section_letter ppc_elf_section_letter
extern bfd_vma ppc_elf_section_letter (int, const char **);