https://bz.apache.org/bugzilla/show_bug.cgi?id=58944

--- Comment #1 from Rainer Jung <[email protected]> ---
This code comes form APACHE_CHECK_OPENSSL in acinclude.m4, which in turn uses
APR_ADDTO to add the flags.

APR_ADDTO is part of APR and defined in apr_common.m4. It adds all tokens given
in the second argument to the variable which name is given in the first
argument. It does this by processing tokens fromleft to right.

Unfortunately for redundant library dependencies this can lead to a result that
doesn't work, because ordering is relevant for library dependencies (-l...).

It looks to me as we would need a version of APR_ADDTO that works from right to
left:

- combine original token and full list of new tokens in new token list
- create a new empty token result list
- work through new list from right to left, copy any token to the front of the
result list that is not already part of the result list.

Because of APR versioning I guess we can't rely on such a new macro in httpd
2.4 and thus would have to add it to APR for future use but use a private copy
in httpd.

The same problem might occur in any place we use APR_ADDTo to handle "-l" flags
and where the libraries might have complex dependencies themselves. I don't
have another concrete example than openssl in my mind though.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to