Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • aports aports
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
  • Issues 660
    • Issues 660
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 334
    • Merge requests 334
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • alpinealpine
  • aportsaports
  • Issues
  • #12477
Closed
Open
Issue created Feb 25, 2021 by Roger Pau Monné@roger.pau

Wrong order of gcc include paths

The order of the default gcc include search path is wrong on Alpine:

# gcc -E -Wp,-v -
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../x86_64-alpine-linux-musl/include"
ignoring nonexistent directory "/usr/include/fortify"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
 /usr/lib/gcc/x86_64-alpine-linux-musl/10.2.1/include
End of search list.

This is wrong as /usr/include is searched for before the gcc private path and it breaks options like -ffreestanding, which rely on the gcc include path being searched first in order to provide the set of freestanding headers.

Edited Feb 25, 2021 by Roger Pau Monné
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking