[cfe-dev] Add -fno-plt,-fplt to ignored flags

Reid Kleckner via cfe-dev cfe-dev at lists.llvm.org
Fri Jul 7 14:31:01 PDT 2017


I think we actually want to implement this flag in the near future. Maybe
Sri can say more.

On Fri, Jul 7, 2017 at 4:32 AM, Jordan Glover via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> In GCC there is a -fno-plt [1] flag not implemented in Clang which results
> in compilation failure:
> clang-4.0: error: unknown argument: '-fno-plt'
>
> I created patch that adds -fno-plt and -fplt to existing ignored flags
> list making it compatible with gcc for package building. I tested it and it
> works as expected. I sent this patch already to cfe-commits [2] list as
> advised [3]. I would be grateful if anyone could review it and merge when
> it's acceptable.
>
> Thank you for your attention. Jordan Glover
>
> [1] https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/Code-
> Gen-Options.html#Code-Gen-Options
> [2] https://lists.llvm.org/pipermail/cfe-commits/Week-of-
> Mon-20170703/197341.html
> [3] https://clang.llvm.org/hacking.html
>
> Index: include/clang/Driver/Options.td
> ===================================================================
> --- include/clang/Driver/Options.td    (revision 307280)
> +++ include/clang/Driver/Options.td    (working copy)
> @@ -2497,6 +2497,7 @@
>  defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">,
> Group<clang_ignored_f_Group>;
>  defm peel_loops : BooleanFFlag<"peel-loops">, Group<clang_ignored_gcc_
> optimization_f_Group>;
>  defm permissive : BooleanFFlag<"permissive">,
> Group<clang_ignored_f_Group>;
> +defm plt : BooleanFFlag<"plt">, Group<clang_ignored_f_Group>;
>  defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">,
> Group<clang_ignored_gcc_optimization_f_Group>;
>  defm printf : BooleanFFlag<"printf">, Group<clang_ignored_f_Group>;
>  defm profile : BooleanFFlag<"profile">, Group<clang_ignored_f_Group>;
> Index: test/Driver/clang_f_opts.c
> ===================================================================
> --- test/Driver/clang_f_opts.c    (revision 307280)
> +++ test/Driver/clang_f_opts.c    (working copy)
> @@ -275,6 +275,7 @@
>  // RUN:     -fno-fat-lto-objects -ffat-lto-objects
> \
>  // RUN:     -fno-merge-constants -fmerge-constants
> \
>  // RUN:     -fno-caller-saves -fcaller-saves
> \
> +// RUN:     -fno-plt
> \
>  // RUN:     -fno-reorder-blocks -freorder-blocks
> \
>  // RUN:     -fno-schedule-insns2 -fschedule-insns2
> \
>  // RUN:     -fno-stack-check
> \
> @@ -281,6 +282,7 @@
>  // RUN:     -fno-check-new -fcheck-new
> \
>  // RUN:     -ffriend-injection
> \
>  // RUN:     -fno-implement-inlines -fimplement-inlines
> \
> +// RUN:     -fplt
> \
>  // RUN:     -fstack-check
> \
>  // RUN:     -fforce-addr
> \
>  // RUN:     -malign-functions=100
> \
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170707/46e1efea/attachment.html>


More information about the cfe-dev mailing list