Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1617261 > unrolled thread
| Started by | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| First post | 2017-04-05 20:20 +0200 |
| Last post | 2017-04-10 17:00 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 2/7] Makefile, x86, LLVM: disable unsupported optimization flags Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-04-05 20:20 +0200
Re: [PATCH 2/7] Makefile, x86, LLVM: disable unsupported optimization flags Matthias Kaehlcke <mka@chromium.org> - 2017-04-05 21:10 +0200
Re: [PATCH 2/7] Makefile, x86, LLVM: disable unsupported optimization flags Michael Davidson <md@google.com> - 2017-04-05 21:20 +0200
Re: [PATCH 2/7] Makefile, x86, LLVM: disable unsupported optimization flags Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-04-10 17:00 +0200
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2017-04-05 20:20 +0200 |
| Subject | Re: [PATCH 2/7] Makefile, x86, LLVM: disable unsupported optimization flags |
| Message-ID | <tsXHc-66T-9@gated-at.bofh.it> |
Hi Michael, 2017-03-17 9:15 GMT+09:00 Michael Davidson <md@google.com>: > Unfortunately, while clang generates a warning about these flags > being unsupported it still exits with a status of 0 so we have > to explicitly disable them instead of just using a cc-option check. > > Signed-off-by: Michael Davidson <md@google.com> Instead, does the following work for you? https://patchwork.kernel.org/patch/9657285/ You need to use $(call cc-option, ...) for -falign-jumps=1 and -falign-loops=1 -- Best Regards Masahiro Yamada
[toc] | [next] | [standalone]
| From | Matthias Kaehlcke <mka@chromium.org> |
|---|---|
| Date | 2017-04-05 21:10 +0200 |
| Subject | Re: [PATCH 2/7] Makefile, x86, LLVM: disable unsupported optimization flags |
| Message-ID | <tsYtB-6BL-43@gated-at.bofh.it> |
| In reply to | #1617261 |
Hi Masahiro, El Thu, Apr 06, 2017 at 03:08:26AM +0900 Masahiro Yamada ha dit: > 2017-03-17 9:15 GMT+09:00 Michael Davidson <md@google.com>: > > Unfortunately, while clang generates a warning about these flags > > being unsupported it still exits with a status of 0 so we have > > to explicitly disable them instead of just using a cc-option check. > > > > Signed-off-by: Michael Davidson <md@google.com> > > > Instead, does the following work for you? > https://patchwork.kernel.org/patch/9657285/ Thanks for the pointer, I was about to give this change (or rather its ancestor) a rework myself :) > You need to use > $(call cc-option, ...) > for -falign-jumps=1 and -falign-loops=1 I can confirm that this works. Thanks Matthias
[toc] | [prev] | [next] | [standalone]
| From | Michael Davidson <md@google.com> |
|---|---|
| Date | 2017-04-05 21:20 +0200 |
| Message-ID | <tsYDf-6EZ-7@gated-at.bofh.it> |
| In reply to | #1617295 |
It "works" for the cases that I currently care about but I have to say that I am uneasy about adding -Werror to the cc-option test in this way. Suppose that one of the *other* flags that is implicitly passed to the compiler by cc-option - eg something that was explicitly specified in $(KBUILD_CFLAGS) - triggers a warning. In that case all calls to cc-option will silently fail because of the -Werror and valid options will not be detected correctly. If everyone is OK with that because "it shouldn't normally ever happen" then that is fine, but if does result in a subtle change from existing behavior (and a trap that I almost immediately fell into after applying a similar patch). On Wed, Apr 5, 2017 at 12:01 PM, Matthias Kaehlcke <mka@chromium.org> wrote: > Hi Masahiro, > > El Thu, Apr 06, 2017 at 03:08:26AM +0900 Masahiro Yamada ha dit: > >> 2017-03-17 9:15 GMT+09:00 Michael Davidson <md@google.com>: >> > Unfortunately, while clang generates a warning about these flags >> > being unsupported it still exits with a status of 0 so we have >> > to explicitly disable them instead of just using a cc-option check. >> > >> > Signed-off-by: Michael Davidson <md@google.com> >> >> >> Instead, does the following work for you? >> https://patchwork.kernel.org/patch/9657285/ > > Thanks for the pointer, I was about to give this change (or rather its > ancestor) a rework myself :) > >> You need to use >> $(call cc-option, ...) >> for -falign-jumps=1 and -falign-loops=1 > > I can confirm that this works. > > Thanks > > Matthias
[toc] | [prev] | [next] | [standalone]
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2017-04-10 17:00 +0200 |
| Message-ID | <tuIXo-21C-15@gated-at.bofh.it> |
| In reply to | #1617298 |
Hi. 2017-04-06 4:11 GMT+09:00 Michael Davidson <md@google.com>: > It "works" for the cases that I currently care about but I have to say > that I am uneasy about adding -Werror to the cc-option test in this > way. > > Suppose that one of the *other* flags that is implicitly passed to the > compiler by cc-option - eg something that was explicitly specified in > $(KBUILD_CFLAGS) - triggers a warning. In that case all calls to > cc-option will silently fail because of the -Werror and valid options > will not be detected correctly. Theoretically, options explicitly specified in KBUILD_CFLAGS should be always valid. Options that may not be supported in some cases should be wrapped with $(call cc-option ). > If everyone is OK with that because "it shouldn't normally ever > happen" then that is fine, but if does result in a subtle change from > existing behavior (and a trap that I almost immediately fell into > after applying a similar patch). There is a rare case where a particular combination fails (such as the conflict between -pg and -ffunction-sections as reported in https://patchwork.kernel.org/patch/9624573/). In a such case, we may end up with swapping the order, but this should not happen quite often. > On Wed, Apr 5, 2017 at 12:01 PM, Matthias Kaehlcke <mka@chromium.org> wrote: >> Hi Masahiro, >> >> El Thu, Apr 06, 2017 at 03:08:26AM +0900 Masahiro Yamada ha dit: >> >>> 2017-03-17 9:15 GMT+09:00 Michael Davidson <md@google.com>: >>> > Unfortunately, while clang generates a warning about these flags >>> > being unsupported it still exits with a status of 0 so we have >>> > to explicitly disable them instead of just using a cc-option check. >>> > >>> > Signed-off-by: Michael Davidson <md@google.com> >>> >>> >>> Instead, does the following work for you? >>> https://patchwork.kernel.org/patch/9657285/ >> >> Thanks for the pointer, I was about to give this change (or rather its >> ancestor) a rework myself :) >> >>> You need to use >>> $(call cc-option, ...) >>> for -falign-jumps=1 and -falign-loops=1 >> >> I can confirm that this works. >> >> Thanks >> >> Matthias > -- > To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Best Regards Masahiro Yamada
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web