Author Topic: GCC 10.x on Windows, dependencies and absolute paths  (Read 1437 times)

0 Members and 1 Guest are viewing this topic.

Offline SiliconWizardTopic starter

  • Super Contributor
  • ***
  • Posts: 14911
  • Country: fr
GCC 10.x on Windows, dependencies and absolute paths
« on: February 10, 2021, 10:54:38 pm »
Just a quick note for anyone that would happen to use GCC 10.x (any target) on Windows (which would be pretty common if you're developing for embedded targets). The latest ARM GCC ( https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads ) is affected - as any GCC 10.x compiler.

There was a modification in the way dependencies (makedep) are generated (so for instance through the -MM option and such), and the colon ':' character is now escaped. That means that on Windows, if you're using absolute paths (which is not uncommon if you're using system-wide SDKs, libraries, etc.), the dependencies will be messed up - basically unusable. A backslash will be added before each ':' in dependency rules, which is not a valid Windows path. So that makes the build fail. Eg.: "D:\SomePath" will become "D\:\SomePath" => invalid.

There is currently no workaround that I know of, except either using only relative paths, or using an earlier version of GCC (max. 9.x). Or not using auto-generated dependencies through GCC - but it's pretty handy. Or, of course, not using Windows.

The regression has been handled and the fix should be available in the next 10.3 version: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95253
« Last Edit: February 10, 2021, 10:56:33 pm by SiliconWizard »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf