project-navigation
Personal tools

Author Topic: Missing bfd_get_section macros  (Read 6592 times)

Offline IHatePickingUserNames

  • Cannon Fodder
  • **
  • Posts: 3
    • View Profile
Missing bfd_get_section macros
« on: December 22, 2020, 04:04:32 pm »
Hi, in UFO:AI there is a commit (a542a87) for handling the function name changes in binutils which does things like this:

#   define bfd_get_section_flags(bfd, section) (bfd_section_flags(section))

Now the weird thing is that it doesn't work on my system (with GCC 10.2.0). In particular it works if the tab is before the pound but if the tab is after the pound then GCC will insist that the function is not defined. The syntax is correct (see the GCC online docs under section "The-preprocessing-language", I can't post links).

Is it just me or does anyone else see the same problem? If it's a wider toolchain issue I'll need to investigate or at least report it. If I'm just doing something stupid in my setup, I'd like to know as well. Also if it's a widespread problem then even if the problem isn't UFO:AI's it might be good to add a workaround.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Missing bfd_get_section macros
« Reply #1 on: December 24, 2020, 01:15:54 am »
Hi, I've just compiled the game with gcc 10.2.0, had no issue with the defines. UfoRadiant seems missing X11 LDFlag, but that's it.
Could you share more information about your environment? Maybe even build logs?

-geever

Offline IHatePickingUserNames

  • Cannon Fodder
  • **
  • Posts: 3
    • View Profile
Re: Missing bfd_get_section macros
« Reply #2 on: December 30, 2020, 05:00:59 pm »
Hi, I've just compiled the game with gcc 10.2.0, had no issue with the defines. UfoRadiant seems missing X11 LDFlag, but that's it.
Could you share more information about your environment? Maybe even build logs?

-geever

Okay, now this is the weirdest thing. It's compiling now that I've not really made any changes which are SUPPOSED to affect it. After posting that I had to make minor changes to build uforadiant (specifically, had to get gtkglext-pangox from AUR because the other one didn't work) and now it handles the syntax correctly. Strange indeed and it worries me that I don't know why it would happen like that.

Thanks.