Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
P
pkg-config
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 56
    • Issues 56
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 7
    • Merge Requests 7
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pkg-config
  • pkg-config
  • Issues
  • #32

Closed
Open
Opened Mar 12, 2018 by Bugzilla Migration User@bugzilla-migration

man: Suggest using shell function from make to process pkg-config output correctly.

Submitted by Tomasz Miąsko

Assigned to pkg..@..op.org

Link to original bug (#105461)

Description

Created attachment 138029 [PATCH] man: Use shell function from make to process pkg-config

pkg-config uses backslashes to escape special characters (including spaces among others) in its --cflags and --libs output.

This is incompatible with command substitution as used in POSIX shell, i.e., $(cmd ...) or cmd ..., because field splitting following such substitution splits the result using sequences of <space>, <tab>, and <newline> characters as separators (supposing default value of IFS). Backslash does not have any special meaning in this process, and thus escaping for those characters is ineffective.

Suggest using shell make function instead, which will expand the results into the command output (converting newlines into spaces, but not processing it further), and then when final command is executed by POSIX shell, the shell tokenization rules will take into effect which do respect backquotes and split input using unquoted <blank> (<space> or <tab> in POSIX locale).

Patch 138029, "[PATCH] man: Use shell function from make to process pkg-config":
0001-man-Use-shell-function-from-make-to-process-pkg-conf.patch

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: pkg-config/pkg-config#32