Skip to content

configure shouldn't silently strip debug options #7216

Closed
@Hello71

Description

@Hello71
Contributor

CFLAGS=-g ./configure assumes --without-debug then ignores -g. i think that without explicit --without-debug it shouldn't be ignored at all, and even with --without-debug it should allow compiling with -g anyways (interpreting --without-debug as "don't add debug flags", not "remove all debugging functionality") or at least issue an error and fail loudly.

CURL_VAR_STRIP([tmp_CFLAGS],[$flags_dbg_all])

i suspect this was initially done due to autoconf CFLAGS="-g -O2" default, but it's a very unintuitive behavior, and from a distro level means we need to do special work to support curl debugging. --with-debug seems not right for us either, since we may want to specify our own setting. in fact, as i read it, it is currently totally impossible to set anything other than -g (with gcc/clang), since -g* is stripped and replaced with either -g or nothing.

Activity

added a commit that references this issue on Jun 16, 2021
ea07201
bagder

bagder commented on Jun 17, 2021

@bagder
Member

@Hello71 I presume #7267 is then in line with your thinking?

Hello71

Hello71 commented on Jun 17, 2021

@Hello71
ContributorAuthor

yes, thanks!

added a commit that references this issue on Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @bagder@Hello71@jay

      Issue actions

        configure shouldn't silently strip debug options · Issue #7216 · curl/curl