https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120394
Bug ID: 120394 Summary: c++tools: configure doesn't honer --disable-default-pie Product: gcc Version: 15.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: deminhan at gcc dot gnu.org Target Milestone: --- when pass --disable-default-pie, the enable_default_pie var would be "no". The if condition met, and PICFLAG was set wrongly. We should use "yes" or "no" for condition. Similar issues for host-pie and host-bind-now. # Check whether --enable-default-pie was given. # Check whether --enable-default-pie was given. if test "${enable_default_pie+set}" = set; then : enableval=$enable_default_pie; PICFLAG=-fPIE else PICFLAG= fi # Enable --enable-host-pie # Check whether --enable-host-pie was given. if test "${enable_host_pie+set}" = set; then : enableval=$enable_host_pie; PICFLAG=-fPIE; LD_PICFLAG=-pie fi # Enable --enable-host-bind-now # Check whether --enable-host-bind-now was given. if test "${enable_host_bind_now+set}" = set; then : enableval=$enable_host_bind_now; LD_PICFLAG="$LD_PICFLAG -Wl,-z,now" fi