Commit 4bc92736 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'kbuild-fixes-v5.8-2' of...

Merge tag 'kbuild-fixes-v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes frin Masahiro Yamada:

 - fix various bugs in xconfig

 - fix some issues in cross-compilation using Clang

 - fix documentation

* tag 'kbuild-fixes-v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  .gitignore: Do not track `defconfig` from `make savedefconfig`
  kbuild: make Clang build userprogs for target architecture
  kbuild: fix CONFIG_CC_CAN_LINK(_STATIC) for cross-compilation with Clang
  kconfig: qconf: parse newer types at debug info
  kconfig: qconf: navigate menus on hyperlinks
  kconfig: qconf: don't show goback button on splitMode
  kconfig: qconf: simplify the goBack() logic
  kconfig: qconf: re-implement setSelected()
  kconfig: qconf: make debug links work again
  kconfig: qconf: make search fully work again on split mode
  kconfig: qconf: cleanup includes
  docs: kbuild: fix ReST formatting
  gcc-plugins: fix gcc-plugins directory path in documentation
parents 19a61a75 ba77dca5
...@@ -143,6 +143,9 @@ x509.genkey ...@@ -143,6 +143,9 @@ x509.genkey
/allrandom.config /allrandom.config
/allyes.config /allyes.config
# Kconfig savedefconfig output
/defconfig
# Kdevelop4 # Kdevelop4
*.kdev4 *.kdev4
......
...@@ -182,7 +182,8 @@ module 8123.ko, which is built from the following files:: ...@@ -182,7 +182,8 @@ module 8123.ko, which is built from the following files::
8123_pci.c 8123_pci.c
8123_bin.o_shipped <= Binary blob 8123_bin.o_shipped <= Binary blob
--- 3.1 Shared Makefile 3.1 Shared Makefile
-------------------
An external module always includes a wrapper makefile that An external module always includes a wrapper makefile that
supports building the module using "make" with no arguments. supports building the module using "make" with no arguments.
......
...@@ -101,7 +101,7 @@ Structure randomisation ...@@ -101,7 +101,7 @@ Structure randomisation
If you enable ``CONFIG_GCC_PLUGIN_RANDSTRUCT``, you will need to If you enable ``CONFIG_GCC_PLUGIN_RANDSTRUCT``, you will need to
pre-generate the random seed in pre-generate the random seed in
``scripts/gcc-plgins/randomize_layout_seed.h`` so the same value ``scripts/gcc-plugins/randomize_layout_seed.h`` so the same value
is used in rebuilds. is used in rebuilds.
Debug info conflicts Debug info conflicts
......
...@@ -970,8 +970,8 @@ LDFLAGS_vmlinux += --pack-dyn-relocs=relr ...@@ -970,8 +970,8 @@ LDFLAGS_vmlinux += --pack-dyn-relocs=relr
endif endif
# Align the bit size of userspace programs with the kernel # Align the bit size of userspace programs with the kernel
KBUILD_USERCFLAGS += $(filter -m32 -m64, $(KBUILD_CFLAGS)) KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
KBUILD_USERLDFLAGS += $(filter -m32 -m64, $(KBUILD_CFLAGS)) KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
# make the checker run with the right architecture # make the checker run with the right architecture
CHECKFLAGS += --arch=$(ARCH) CHECKFLAGS += --arch=$(ARCH)
......
...@@ -49,13 +49,13 @@ config CLANG_VERSION ...@@ -49,13 +49,13 @@ config CLANG_VERSION
config CC_CAN_LINK config CC_CAN_LINK
bool bool
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(m64-flag)) if 64BIT default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m64-flag)) if 64BIT
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(m32-flag)) default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m32-flag))
config CC_CAN_LINK_STATIC config CC_CAN_LINK_STATIC
bool bool
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) -static $(m64-flag)) if 64BIT default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m64-flag) -static) if 64BIT
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) -static $(m32-flag)) default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m32-flag) -static)
config CC_HAS_ASM_GOTO config CC_HAS_ASM_GOTO
def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC)) def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC))
......
...@@ -78,7 +78,7 @@ config GCC_PLUGIN_RANDSTRUCT ...@@ -78,7 +78,7 @@ config GCC_PLUGIN_RANDSTRUCT
source tree isn't cleaned after kernel installation). source tree isn't cleaned after kernel installation).
The seed used for compilation is located at The seed used for compilation is located at
scripts/gcc-plgins/randomize_layout_seed.h. It remains after scripts/gcc-plugins/randomize_layout_seed.h. It remains after
a make clean to allow for external modules to be compiled with a make clean to allow for external modules to be compiled with
the existing seed and will be removed by a make mrproper or the existing seed and will be removed by a make mrproper or
make distclean. make distclean.
......
...@@ -4,27 +4,19 @@ ...@@ -4,27 +4,19 @@
* Copyright (C) 2015 Boris Barbulovski <bbarbulovski@gmail.com> * Copyright (C) 2015 Boris Barbulovski <bbarbulovski@gmail.com>
*/ */
#include <qglobal.h>
#include <QMainWindow>
#include <QList>
#include <qtextbrowser.h>
#include <QAction> #include <QAction>
#include <QApplication>
#include <QCloseEvent>
#include <QDebug>
#include <QDesktopWidget>
#include <QFileDialog> #include <QFileDialog>
#include <QLabel>
#include <QLayout>
#include <QList>
#include <QMenu> #include <QMenu>
#include <QMenuBar>
#include <qapplication.h> #include <QMessageBox>
#include <qdesktopwidget.h> #include <QToolBar>
#include <qtoolbar.h>
#include <qlayout.h>
#include <qsplitter.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qmenubar.h>
#include <qmessagebox.h>
#include <qregexp.h>
#include <qevent.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -445,10 +437,11 @@ void ConfigList::updateList(ConfigItem* item) ...@@ -445,10 +437,11 @@ void ConfigList::updateList(ConfigItem* item)
if (rootEntry != &rootmenu && (mode == singleMode || if (rootEntry != &rootmenu && (mode == singleMode ||
(mode == symbolMode && rootEntry->parent != &rootmenu))) { (mode == symbolMode && rootEntry->parent != &rootmenu))) {
item = (ConfigItem *)topLevelItem(0); item = (ConfigItem *)topLevelItem(0);
if (!item) if (!item && mode != symbolMode) {
item = new ConfigItem(this, 0, true); item = new ConfigItem(this, 0, true);
last = item; last = item;
} }
}
if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) && if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) &&
rootEntry->sym && rootEntry->prompt) { rootEntry->sym && rootEntry->prompt) {
item = last ? last->nextSibling() : firstChild(); item = last ? last->nextSibling() : firstChild();
...@@ -545,7 +538,7 @@ void ConfigList::setRootMenu(struct menu *menu) ...@@ -545,7 +538,7 @@ void ConfigList::setRootMenu(struct menu *menu)
rootEntry = menu; rootEntry = menu;
updateListAll(); updateListAll();
if (currentItem()) { if (currentItem()) {
currentItem()->setSelected(hasFocus()); setSelected(currentItem(), hasFocus());
scrollToItem(currentItem()); scrollToItem(currentItem());
} }
} }
...@@ -873,7 +866,7 @@ void ConfigList::focusInEvent(QFocusEvent *e) ...@@ -873,7 +866,7 @@ void ConfigList::focusInEvent(QFocusEvent *e)
ConfigItem* item = (ConfigItem *)currentItem(); ConfigItem* item = (ConfigItem *)currentItem();
if (item) { if (item) {
item->setSelected(true); setSelected(item, true);
menu = item->menu; menu = item->menu;
} }
emit gotFocus(menu); emit gotFocus(menu);
...@@ -1021,7 +1014,7 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) ...@@ -1021,7 +1014,7 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
: Parent(parent), sym(0), _menu(0) : Parent(parent), sym(0), _menu(0)
{ {
setObjectName(name); setObjectName(name);
setOpenLinks(false);
if (!objectName().isEmpty()) { if (!objectName().isEmpty()) {
configSettings->beginGroup(objectName()); configSettings->beginGroup(objectName());
...@@ -1094,7 +1087,7 @@ void ConfigInfoView::menuInfo(void) ...@@ -1094,7 +1087,7 @@ void ConfigInfoView::menuInfo(void)
if (sym->name) { if (sym->name) {
head += " ("; head += " (";
if (showDebug()) if (showDebug())
head += QString().sprintf("<a href=\"s%p\">", sym); head += QString().sprintf("<a href=\"s%s\">", sym->name);
head += print_filter(sym->name); head += print_filter(sym->name);
if (showDebug()) if (showDebug())
head += "</a>"; head += "</a>";
...@@ -1103,7 +1096,7 @@ void ConfigInfoView::menuInfo(void) ...@@ -1103,7 +1096,7 @@ void ConfigInfoView::menuInfo(void)
} else if (sym->name) { } else if (sym->name) {
head += "<big><b>"; head += "<big><b>";
if (showDebug()) if (showDebug())
head += QString().sprintf("<a href=\"s%p\">", sym); head += QString().sprintf("<a href=\"s%s\">", sym->name);
head += print_filter(sym->name); head += print_filter(sym->name);
if (showDebug()) if (showDebug())
head += "</a>"; head += "</a>";
...@@ -1154,13 +1147,16 @@ QString ConfigInfoView::debug_info(struct symbol *sym) ...@@ -1154,13 +1147,16 @@ QString ConfigInfoView::debug_info(struct symbol *sym)
switch (prop->type) { switch (prop->type) {
case P_PROMPT: case P_PROMPT:
case P_MENU: case P_MENU:
debug += QString().sprintf("prompt: <a href=\"m%p\">", prop->menu); debug += QString().sprintf("prompt: <a href=\"m%s\">", sym->name);
debug += print_filter(prop->text); debug += print_filter(prop->text);
debug += "</a><br>"; debug += "</a><br>";
break; break;
case P_DEFAULT: case P_DEFAULT:
case P_SELECT: case P_SELECT:
case P_RANGE: case P_RANGE:
case P_COMMENT:
case P_IMPLY:
case P_SYMBOL:
debug += prop_get_type_name(prop->type); debug += prop_get_type_name(prop->type);
debug += ": "; debug += ": ";
expr_print(prop->expr, expr_print_help, &debug, E_NONE); expr_print(prop->expr, expr_print_help, &debug, E_NONE);
...@@ -1226,13 +1222,62 @@ void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char ...@@ -1226,13 +1222,62 @@ void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char
QString str2 = print_filter(str); QString str2 = print_filter(str);
if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) { if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) {
*text += QString().sprintf("<a href=\"s%p\">", sym); *text += QString().sprintf("<a href=\"s%s\">", sym->name);
*text += str2; *text += str2;
*text += "</a>"; *text += "</a>";
} else } else
*text += str2; *text += str2;
} }
void ConfigInfoView::clicked(const QUrl &url)
{
QByteArray str = url.toEncoded();
const std::size_t count = str.size();
char *data = new char[count + 1];
struct symbol **result;
struct menu *m = NULL;
if (count < 1) {
qInfo() << "Clicked link is empty";
delete data;
return;
}
memcpy(data, str.constData(), count);
data[count] = '\0';
/* Seek for exact match */
data[0] = '^';
strcat(data, "$");
result = sym_re_search(data);
if (!result) {
qInfo() << "Clicked symbol is invalid:" << data;
delete data;
return;
}
sym = *result;
/* Seek for the menu which holds the symbol */
for (struct property *prop = sym->prop; prop; prop = prop->next) {
if (prop->type != P_PROMPT && prop->type != P_MENU)
continue;
m = prop->menu;
break;
}
if (!m) {
/* Symbol is not visible as a menu */
symbolInfo();
emit showDebugChanged(true);
} else {
emit menuSelected(m);
}
free(result);
delete data;
}
QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos) QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
{ {
QMenu* popup = Parent::createStandardContextMenu(pos); QMenu* popup = Parent::createStandardContextMenu(pos);
...@@ -1403,17 +1448,21 @@ ConfigMainWindow::ConfigMainWindow(void) ...@@ -1403,17 +1448,21 @@ ConfigMainWindow::ConfigMainWindow(void)
backAction = new QAction(QPixmap(xpm_back), "Back", this); backAction = new QAction(QPixmap(xpm_back), "Back", this);
connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack())); connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack()));
backAction->setEnabled(false);
QAction *quitAction = new QAction("&Quit", this); QAction *quitAction = new QAction("&Quit", this);
quitAction->setShortcut(Qt::CTRL + Qt::Key_Q); quitAction->setShortcut(Qt::CTRL + Qt::Key_Q);
connect(quitAction, SIGNAL(triggered(bool)), SLOT(close())); connect(quitAction, SIGNAL(triggered(bool)), SLOT(close()));
QAction *loadAction = new QAction(QPixmap(xpm_load), "&Load", this); QAction *loadAction = new QAction(QPixmap(xpm_load), "&Load", this);
loadAction->setShortcut(Qt::CTRL + Qt::Key_L); loadAction->setShortcut(Qt::CTRL + Qt::Key_L);
connect(loadAction, SIGNAL(triggered(bool)), SLOT(loadConfig())); connect(loadAction, SIGNAL(triggered(bool)), SLOT(loadConfig()));
saveAction = new QAction(QPixmap(xpm_save), "&Save", this); saveAction = new QAction(QPixmap(xpm_save), "&Save", this);
saveAction->setShortcut(Qt::CTRL + Qt::Key_S); saveAction->setShortcut(Qt::CTRL + Qt::Key_S);
connect(saveAction, SIGNAL(triggered(bool)), SLOT(saveConfig())); connect(saveAction, SIGNAL(triggered(bool)), SLOT(saveConfig()));
conf_set_changed_callback(conf_changed); conf_set_changed_callback(conf_changed);
// Set saveAction's initial state // Set saveAction's initial state
conf_changed(); conf_changed();
configname = xstrdup(conf_get_configname()); configname = xstrdup(conf_get_configname());
...@@ -1506,6 +1555,9 @@ ConfigMainWindow::ConfigMainWindow(void) ...@@ -1506,6 +1555,9 @@ ConfigMainWindow::ConfigMainWindow(void)
helpMenu->addAction(showIntroAction); helpMenu->addAction(showIntroAction);
helpMenu->addAction(showAboutAction); helpMenu->addAction(showAboutAction);
connect (helpText, SIGNAL (anchorClicked (const QUrl &)),
helpText, SLOT (clicked (const QUrl &)) );
connect(configList, SIGNAL(menuChanged(struct menu *)), connect(configList, SIGNAL(menuChanged(struct menu *)),
helpText, SLOT(setInfo(struct menu *))); helpText, SLOT(setInfo(struct menu *)));
connect(configList, SIGNAL(menuSelected(struct menu *)), connect(configList, SIGNAL(menuSelected(struct menu *)),
...@@ -1611,21 +1663,11 @@ void ConfigMainWindow::searchConfig(void) ...@@ -1611,21 +1663,11 @@ void ConfigMainWindow::searchConfig(void)
void ConfigMainWindow::changeItens(struct menu *menu) void ConfigMainWindow::changeItens(struct menu *menu)
{ {
configList->setRootMenu(menu); configList->setRootMenu(menu);
if (configList->rootEntry->parent == &rootmenu)
backAction->setEnabled(false);
else
backAction->setEnabled(true);
} }
void ConfigMainWindow::changeMenu(struct menu *menu) void ConfigMainWindow::changeMenu(struct menu *menu)
{ {
menuList->setRootMenu(menu); menuList->setRootMenu(menu);
if (menuList->rootEntry->parent == &rootmenu)
backAction->setEnabled(false);
else
backAction->setEnabled(true);
} }
void ConfigMainWindow::setMenuLink(struct menu *menu) void ConfigMainWindow::setMenuLink(struct menu *menu)
...@@ -1645,22 +1687,26 @@ void ConfigMainWindow::setMenuLink(struct menu *menu) ...@@ -1645,22 +1687,26 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
return; return;
list->setRootMenu(parent); list->setRootMenu(parent);
break; break;
case symbolMode: case menuMode:
if (menu->flags & MENU_ROOT) { if (menu->flags & MENU_ROOT) {
configList->setRootMenu(menu); menuList->setRootMenu(menu);
configList->clearSelection(); configList->clearSelection();
list = menuList;
} else {
list = configList; list = configList;
} else {
parent = menu_get_parent_menu(menu->parent); parent = menu_get_parent_menu(menu->parent);
if (!parent) if (!parent)
return; return;
item = menuList->findConfigItem(parent);
/* Select the config view */
item = configList->findConfigItem(parent);
if (item) { if (item) {
item->setSelected(true); configList->setSelected(item, true);
menuList->scrollToItem(item); configList->scrollToItem(item);
} }
list->setRootMenu(parent);
menuList->setRootMenu(parent);
menuList->clearSelection();
list = menuList;
} }
break; break;
case fullMode: case fullMode:
...@@ -1673,9 +1719,10 @@ void ConfigMainWindow::setMenuLink(struct menu *menu) ...@@ -1673,9 +1719,10 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
if (list) { if (list) {
item = list->findConfigItem(menu); item = list->findConfigItem(menu);
if (item) { if (item) {
item->setSelected(true); list->setSelected(item, true);
list->scrollToItem(item); list->scrollToItem(item);
list->setFocus(); list->setFocus();
helpText->setInfo(menu);
} }
} }
} }
...@@ -1688,25 +1735,11 @@ void ConfigMainWindow::listFocusChanged(void) ...@@ -1688,25 +1735,11 @@ void ConfigMainWindow::listFocusChanged(void)
void ConfigMainWindow::goBack(void) void ConfigMainWindow::goBack(void)
{ {
ConfigItem* item, *oldSelection; qInfo() << __FUNCTION__;
configList->setParentMenu();
if (configList->rootEntry == &rootmenu) if (configList->rootEntry == &rootmenu)
backAction->setEnabled(false);
if (menuList->selectedItems().count() == 0)
return; return;
item = (ConfigItem*)menuList->selectedItems().first(); configList->setParentMenu();
oldSelection = item;
while (item) {
if (item->menu == configList->rootEntry) {
oldSelection->setSelected(false);
item->setSelected(true);
break;
}
item = (ConfigItem*)item->parent();
}
} }
void ConfigMainWindow::showSingleView(void) void ConfigMainWindow::showSingleView(void)
...@@ -1718,6 +1751,8 @@ void ConfigMainWindow::showSingleView(void) ...@@ -1718,6 +1751,8 @@ void ConfigMainWindow::showSingleView(void)
fullViewAction->setEnabled(true); fullViewAction->setEnabled(true);
fullViewAction->setChecked(false); fullViewAction->setChecked(false);
backAction->setEnabled(true);
menuView->hide(); menuView->hide();
menuList->setRootMenu(0); menuList->setRootMenu(0);
configList->mode = singleMode; configList->mode = singleMode;
...@@ -1737,6 +1772,8 @@ void ConfigMainWindow::showSplitView(void) ...@@ -1737,6 +1772,8 @@ void ConfigMainWindow::showSplitView(void)
fullViewAction->setEnabled(true); fullViewAction->setEnabled(true);
fullViewAction->setChecked(false); fullViewAction->setChecked(false);
backAction->setEnabled(false);
configList->mode = menuMode; configList->mode = menuMode;
if (configList->rootEntry == &rootmenu) if (configList->rootEntry == &rootmenu)
configList->updateListAll(); configList->updateListAll();
...@@ -1760,6 +1797,8 @@ void ConfigMainWindow::showFullView(void) ...@@ -1760,6 +1797,8 @@ void ConfigMainWindow::showFullView(void)
fullViewAction->setEnabled(false); fullViewAction->setEnabled(false);
fullViewAction->setChecked(true); fullViewAction->setChecked(true);
backAction->setEnabled(false);
menuView->hide(); menuView->hide();
menuList->setRootMenu(0); menuList->setRootMenu(0);
configList->mode = fullMode; configList->mode = fullMode;
......
...@@ -3,17 +3,17 @@ ...@@ -3,17 +3,17 @@
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
*/ */
#include <QTextBrowser> #include <QCheckBox>
#include <QTreeWidget> #include <QDialog>
#include <QMainWindow>
#include <QHeaderView> #include <QHeaderView>
#include <qsettings.h> #include <QLineEdit>
#include <QMainWindow>
#include <QPushButton> #include <QPushButton>
#include <QSettings> #include <QSettings>
#include <QLineEdit>
#include <QSplitter> #include <QSplitter>
#include <QCheckBox> #include <QTextBrowser>
#include <QDialog> #include <QTreeWidget>
#include "expr.h" #include "expr.h"
class ConfigView; class ConfigView;
...@@ -45,11 +45,17 @@ class ConfigList : public QTreeWidget { ...@@ -45,11 +45,17 @@ class ConfigList : public QTreeWidget {
public: public:
ConfigList(ConfigView* p, const char *name = 0); ConfigList(ConfigView* p, const char *name = 0);
void reinit(void); void reinit(void);
ConfigItem* findConfigItem(struct menu *);
ConfigView* parent(void) const ConfigView* parent(void) const
{ {
return (ConfigView*)Parent::parent(); return (ConfigView*)Parent::parent();
} }
ConfigItem* findConfigItem(struct menu *); void setSelected(QTreeWidgetItem *item, bool enable) {
for (int i = 0; i < selectedItems().size(); i++)
selectedItems().at(i)->setSelected(false);
item->setSelected(enable);
}
protected: protected:
void keyPressEvent(QKeyEvent *e); void keyPressEvent(QKeyEvent *e);
...@@ -250,6 +256,7 @@ public slots: ...@@ -250,6 +256,7 @@ public slots:
void setInfo(struct menu *menu); void setInfo(struct menu *menu);
void saveSettings(void); void saveSettings(void);
void setShowDebug(bool); void setShowDebug(bool);
void clicked (const QUrl &url);
signals: signals:
void showDebugChanged(bool); void showDebugChanged(bool);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment