Uh oh!
There was an error while loading. Please reload this page.
configure: Support --disable-option-checking - #31169
Conversation
rust-highfive
commented
Jan 24, 2016
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
alexcrichton
commented
Jan 25, 2016
r? @brson |
brson
commented
Jan 29, 2016
@gmbonnet Do you know which options Fedora is passing that we don't support, and also why Fedora can't be told not to pass them? |
There was a problem hiding this comment.
Can you put this at the end of the list so it's displayed last in the UI?
There was a problem hiding this comment.
Of course. Should I move it at the end of all options or just after most --enable/--disable-style options (before --localstatedir) ?
ghost
commented
Jan 29, 2016
In RPM, configure scripts are called via the CFLAGS="${CFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic}";export CFLAGS ; CXXFLAGS="${CXXFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic}";export CXXFLAGS ; FFLAGS="${FFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/usr/lib64/gfortran/modules}";export FFLAGS ; FCFLAGS="${FCFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/usr/lib64/gfortran/modules}";export FCFLAGS ; LDFLAGS="${LDFLAGS:--Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld}";export LDFLAGS; [ "1"= 1 ] &&foriin$(find $(dirname ./configure) -name config.guess -o -name config.sub);do [ -f /usr/lib/rpm/redhat/$(basename $i) ] && /usr/bin/rm -f $i&& /usr/bin/cp -fv /usr/lib/rpm/redhat/$(basename $i)$i;done; [ "1"= 1 ] && [ x !="x-specs=/usr/lib/rpm/redhat/redhat-hardened-ld" ] &&foriin$(find . -name ltmain.sh);do /usr/bin/sed -i.backup -e 's~compiler_flags=$~compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"~'$idone; ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu \
--program-prefix= \
--disable-dependency-tracking \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--includedir=/usr/include \
--libdir=/usr/lib64 \
--libexecdir=/usr/libexec \
--localstatedir=/var \
--sharedstatedir=/var/lib \
--mandir=/usr/share/man \
--infodir=/usr/share/infoValues of options may depend on the target platform. I also believe that this macro's value may differ on other RPM based distributions. It would be possible to do not use the macro at all and to run the configure script with only needed options and environment variables, but this would be error-prone since options added in newer versions of Rust would not be set by default. |
ghost
commented
Feb 3, 2016
I moved the flag to the location that seems the more appropriate ( |
bors
commented
Feb 12, 2016
☔ The latest upstream changes (presumably #31123) made this pull request unmergeable. Please resolve the merge conflicts. |
ghost
commented
Feb 13, 2016
I rebased this pull request. |
alexcrichton
commented
Mar 8, 2016
ping r? @brson (just doing a routine cleanup of the queue) |
bors
commented
Mar 18, 2016
☔ The latest upstream changes (presumably #32080) made this pull request unmergeable. Please resolve the merge conflicts. |
ghost
commented
Mar 19, 2016
It's rebased again. |
bors
commented
Apr 3, 2016
☔ The latest upstream changes (presumably #32168) made this pull request unmergeable. Please resolve the merge conflicts. |
brson
commented
Apr 20, 2016
@bors r+ Sorry for the long delay. |
bors
commented
Apr 20, 2016
📌 Commit 1a732c5 has been approved by |
bors
commented
Apr 22, 2016
🔒 Merge conflict |
ghost
commented
Apr 22, 2016
Sorry, I forgot to rebase my commits. Now it's done. |
alexcrichton
commented
Apr 22, 2016
…=brson configure: Support --disable-option-checking I'm trying to package Rust for Fedora (this is nothing official (yet)). The standard RPM packaging process involves running `./configure` with a whole lot of options that are commonly recognized by autotools configure scripts, but not by Rust's one. Since it does not make much sense to support all of this options, I think it would be great to support at least `--disable-option-checking`, so Rust's configure script would not fail. [The old attempt](https://github.com/fabiand/rust-spec/blob/master/rustc.spec) to package Rust used a sed script (at line 72), but this is not the recommended way to do that.
bors
commented
Apr 22, 2016
configure: Support --disable-option-checking I'm trying to package Rust for Fedora (this is nothing official (yet)). The standard RPM packaging process involves running `./configure` with a whole lot of options that are commonly recognized by autotools configure scripts, but not by Rust's one. Since it does not make much sense to support all of this options, I think it would be great to support at least `--disable-option-checking`, so Rust's configure script would not fail. [The old attempt](https://github.com/fabiand/rust-spec/blob/master/rustc.spec) to package Rust used a sed script (at line 72), but this is not the recommended way to do that.
alexcrichton
commented
Apr 22, 2016
All tests passed but I confused bors, so merging manually. |
This is mirroring rust-lang/rust#31169. The RPM %configure macro sets a lot of useful paths for typical configure scripts, but some of these values are not recognized here in Cargo. It's nice to have an option to ignore those, rather than failing on `validate_opt`.
configure: Support --disable-option-checking This is mirroring rust-lang/rust#31169. The RPM %configure macro sets a lot of useful paths for typical configure scripts, but some of these values are not recognized here in Cargo. It's nice to have an option to ignore those, rather than failing on `validate_opt`.
I'm trying to package Rust for Fedora (this is nothing official (yet)).
The standard RPM packaging process involves running
./configurewith a whole lot of options that are commonly recognized by autotools configure scripts, but not by Rust's one. Since it does not make much sense to support all of this options, I think it would be great to support at least--disable-option-checking, so Rust's configure script would not fail.The old attempt to package Rust used a sed script (at line 72), but this is not the recommended way to do that.