Skip to content

Commit 12a5336

Browse files
committed
Merge tag 'kbuild-fixes-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - Fix stale help text in gconfig - Support *.S files in compile_commands.json - Flatten KBUILD_CFLAGS - Fix external module builds with Rust so that temporary files are created in the modules directories instead of the kernel tree * tag 'kbuild-fixes-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: rust: avoid creating temporary files kbuild: flatten KBUILD_CFLAGS gen_compile_commands: add assembly files to compilation database kconfig: gconfig: correct program name in help text kconfig: gconfig: drop the Show Debug Info help text
2 parents 269f4a4 + df01b7c commit 12a5336

File tree

5 files changed

+31
-15
lines changed

5 files changed

+31
-15
lines changed

Makefile

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -555,11 +555,23 @@ LINUXINCLUDE := \
555555
$(USERINCLUDE)
556556

557557
KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
558-
KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
559-
-fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
560-
-Werror=implicit-function-declaration -Werror=implicit-int \
561-
-Werror=return-type -Wno-format-security -funsigned-char \
562-
-std=gnu11
558+
559+
KBUILD_CFLAGS :=
560+
KBUILD_CFLAGS += -std=gnu11
561+
KBUILD_CFLAGS += -fshort-wchar
562+
KBUILD_CFLAGS += -funsigned-char
563+
KBUILD_CFLAGS += -fno-common
564+
KBUILD_CFLAGS += -fno-PIE
565+
KBUILD_CFLAGS += -fno-strict-aliasing
566+
KBUILD_CFLAGS += -Wall
567+
KBUILD_CFLAGS += -Wundef
568+
KBUILD_CFLAGS += -Werror=implicit-function-declaration
569+
KBUILD_CFLAGS += -Werror=implicit-int
570+
KBUILD_CFLAGS += -Werror=return-type
571+
KBUILD_CFLAGS += -Werror=strict-prototypes
572+
KBUILD_CFLAGS += -Wno-format-security
573+
KBUILD_CFLAGS += -Wno-trigraphs
574+
563575
KBUILD_CPPFLAGS := -D__KERNEL__
564576
KBUILD_RUSTFLAGS := $(rust_common_flags) \
565577
--target=$(objtree)/scripts/target.json \

scripts/Makefile.build

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ $(obj)/%.lst: $(src)/%.c FORCE
264264

265265
rust_allowed_features := new_uninit
266266

267+
# `--out-dir` is required to avoid temporaries being created by `rustc` in the
268+
# current working directory, which may be not accessible in the out-of-tree
269+
# modules case.
267270
rust_common_cmd = \
268271
RUST_MODFILE=$(modfile) $(RUSTC_OR_CLIPPY) $(rust_flags) \
269272
-Zallow-features=$(rust_allowed_features) \
@@ -272,7 +275,7 @@ rust_common_cmd = \
272275
--extern alloc --extern kernel \
273276
--crate-type rlib -L $(objtree)/rust/ \
274277
--crate-name $(basename $(notdir $@)) \
275-
--emit=dep-info=$(depfile)
278+
--out-dir $(dir $@) --emit=dep-info=$(depfile)
276279

277280
# `--emit=obj`, `--emit=asm` and `--emit=llvm-ir` imply a single codegen unit
278281
# will be used. We explicitly request `-Ccodegen-units=1` in any case, and

scripts/Makefile.host

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ hostc_flags = -Wp,-MMD,$(depfile) \
8686
hostcxx_flags = -Wp,-MMD,$(depfile) \
8787
$(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
8888
$(HOSTCXXFLAGS_$(target-stem).o)
89-
hostrust_flags = --emit=dep-info=$(depfile) \
89+
90+
# `--out-dir` is required to avoid temporaries being created by `rustc` in the
91+
# current working directory, which may be not accessible in the out-of-tree
92+
# modules case.
93+
hostrust_flags = --out-dir $(dir $@) --emit=dep-info=$(depfile) \
9094
$(KBUILD_HOSTRUSTFLAGS) $(HOST_EXTRARUSTFLAGS) \
9195
$(HOSTRUSTFLAGS_$(target-stem))
9296

scripts/clang-tools/gen_compile_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
_DEFAULT_LOG_LEVEL = 'WARNING'
2020

2121
_FILENAME_PATTERN = r'^\..*\.cmd$'
22-
_LINE_PATTERN = r'^savedcmd_[^ ]*\.o := (.* )([^ ]*\.c) *(;|$)'
22+
_LINE_PATTERN = r'^savedcmd_[^ ]*\.o := (.* )([^ ]*\.[cS]) *(;|$)'
2323
_VALID_LOG_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
2424
# The tools/ directory adopts a different build system, and produces .cmd
2525
# files in a different format. Do not support it.

scripts/kconfig/gconf.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data)
636636
{
637637
GtkWidget *dialog;
638638
const gchar *intro_text =
639-
"Welcome to gkc, the GTK+ graphical configuration tool\n"
639+
"Welcome to gconfig, the GTK+ graphical configuration tool.\n"
640640
"For each option, a blank box indicates the feature is disabled, a\n"
641641
"check indicates it is enabled, and a dot indicates that it is to\n"
642642
"be compiled as a module. Clicking on the box will cycle through the three states.\n"
@@ -647,10 +647,7 @@ void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data)
647647
"Although there is no cross reference yet to help you figure out\n"
648648
"what other options must be enabled to support the option you\n"
649649
"are interested in, you can still view the help of a grayed-out\n"
650-
"option.\n"
651-
"\n"
652-
"Toggling Show Debug Info under the Options menu will show \n"
653-
"the dependencies, which you can then match by examining other options.";
650+
"option.";
654651

655652
dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
656653
GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -667,7 +664,7 @@ void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data)
667664
{
668665
GtkWidget *dialog;
669666
const gchar *about_text =
670-
"gkc is copyright (c) 2002 Romain Lievin <roms@lpg.ticalc.org>.\n"
667+
"gconfig is copyright (c) 2002 Romain Lievin <roms@lpg.ticalc.org>.\n"
671668
"Based on the source code from Roman Zippel.\n";
672669

673670
dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
@@ -685,7 +682,7 @@ void on_license1_activate(GtkMenuItem * menuitem, gpointer user_data)
685682
{
686683
GtkWidget *dialog;
687684
const gchar *license_text =
688-
"gkc is released under the terms of the GNU GPL v2.\n"
685+
"gconfig is released under the terms of the GNU GPL v2.\n"
689686
"For more information, please see the source code or\n"
690687
"visit http://www.fsf.org/licenses/licenses.html\n";
691688

0 commit comments

Comments
 (0)