[tor-bugs] #19220 [Core Tor/Tor]: Do not override Makefile user variables

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Jun 2 10:42:54 UTC 2016


#19220: Do not override Makefile user variables
------------------------------+-----------------
     Reporter:  cypherpunks   |      Owner:
         Type:  defect        |     Status:  new
     Priority:  Low           |  Milestone:
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+-----------------
 This was supposed to be a comment to #19216 but i figured it's better to
 open a new ticket because it's out of scope.

 The real solution to the issue fixed in ticket:19216#comment:4 is to stop
 assigning to CFLAGS (unless when testing the flag but restore the old
 CFLAGS after) because it's a
 [https://www.gnu.org/software/autoconf/manual/automake.html#User-Variables
 user variable] which should never be set by the package. Instead the
 additional parameters should be assigned to a temporary variable (like
 `TOR_CFLAGS` or something) which can be `AC_SUBST`ed and appended to
 `AM_CFLAGS`. The same can be said about `CPPFLAGS` and `LDFLAGS`. For more
 information see
 [https://www.gnu.org/software/autoconf/manual/automake.html#Flag-
 Variables-Ordering].

 Overriding user variables also causes issues when trying to run `make
 distcheck` in build directories that are configured with `--enable-fatal-
 warnings`. It seems the overridden CFLAGS are integrated into the tarball
 and causes the default Autoconf checks to fail.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19220>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list