0

While i'm trying to build gcc itself. İ faced with this strange error.

error was on aarch64.h

and also, i edited header code a bit before compilation

original header code:

 #define PROFILE_HOOK(LABEL)                           \
   {                                                   \
    rtx fun, lr;                                       \
    lr = get_hard_reg_initial_val (Pmode, LR_REGNUM);  \
    fun = gen_rtx_SYMBOL_REF (Pmode, MCOUNT_NAME);     \
    emit_library_call (fun, LCT_NORMAL, VOIDmode, 1, lr, Pmode);    \
   }

İ changed it to:

#define PROFILE_HOOK(LABEL)                 \
  {                                         \
    rtx fun, lr;                            \
    if (!flag_fentry)
      {  //error: expected unqualified-id before.. this line**************
        lr = get_hard_reg_initial_val (Pmode, LR_REGNUM);              \
        fun = gen_rtx_SYMBOL_REF (Pmode, MCOUNT_NAME);                 \
        emit_library_call (fun, LCT_NORMAL, VOIDmode, 1, lr, Pmode);   \
      } //error: expected unqualified-id before.... this line*************
  }

and also i dont know if it makes any difference(color change) but before editing code, whole code looks purple. after editing code, lines below if (!flag_fentry) turned to black

im struggling with it for two days with no success

i really appreciate it if anyone help me.

thanx regards

sir mordred
  • 161
  • 1
  • 13
  • 3
    Multiline defines must have a backslash at the end of every but the last line. You broke it by inserting lines that don't follow that rule. – Siguza May 13 '16 at 15:16
  • 1
    I think you need to use a backslash (\\) to continue the lines you have edited as the define needs to be one logical line – Roger Lindsjö May 13 '16 at 15:17
  • @Siguza can adding backslash to the end of the lines break "if statement" ? should i worry about it? – sir mordred May 13 '16 at 17:27
  • @sirmordred So long as you include a space before the backslash, the preprocessor will "parse it away", so it won't end up in the actual code. – Siguza May 13 '16 at 18:43
  • Ok thanx guys..fixed it.. – sir mordred May 14 '16 at 12:04

0 Answers0