Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+138 -88
+3
.gitignore
··· 143 143 /allrandom.config 144 144 /allyes.config 145 145 146 + # Kconfig savedefconfig output 147 + /defconfig 148 + 146 149 # Kdevelop4 147 150 *.kdev4 148 151
+4 -3
Documentation/kbuild/modules.rst
··· 182 182 8123_pci.c 183 183 8123_bin.o_shipped <= Binary blob 184 184 185 - --- 3.1 Shared Makefile 185 + 3.1 Shared Makefile 186 + ------------------- 186 187 187 188 An external module always includes a wrapper makefile that 188 189 supports building the module using "make" with no arguments. ··· 471 470 472 471 The syntax of the Module.symvers file is:: 473 472 474 - <CRC> <Symbol> <Module> <Export Type> <Namespace> 473 + <CRC> <Symbol> <Module> <Export Type> <Namespace> 475 474 476 - 0xe1cc2a05 usb_stor_suspend drivers/usb/storage/usb-storage EXPORT_SYMBOL_GPL USB_STORAGE 475 + 0xe1cc2a05 usb_stor_suspend drivers/usb/storage/usb-storage EXPORT_SYMBOL_GPL USB_STORAGE 477 476 478 477 The fields are separated by tabs and values may be empty (e.g. 479 478 if no namespace is defined for an exported symbol).
+1 -1
Documentation/kbuild/reproducible-builds.rst
··· 101 101 102 102 If you enable ``CONFIG_GCC_PLUGIN_RANDSTRUCT``, you will need to 103 103 pre-generate the random seed in 104 - ``scripts/gcc-plgins/randomize_layout_seed.h`` so the same value 104 + ``scripts/gcc-plugins/randomize_layout_seed.h`` so the same value 105 105 is used in rebuilds. 106 106 107 107 Debug info conflicts
+2 -2
Makefile
··· 970 970 endif 971 971 972 972 # Align the bit size of userspace programs with the kernel 973 - KBUILD_USERCFLAGS += $(filter -m32 -m64, $(KBUILD_CFLAGS)) 974 - KBUILD_USERLDFLAGS += $(filter -m32 -m64, $(KBUILD_CFLAGS)) 973 + KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS)) 974 + KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS)) 975 975 976 976 # make the checker run with the right architecture 977 977 CHECKFLAGS += --arch=$(ARCH)
+4 -4
init/Kconfig
··· 49 49 50 50 config CC_CAN_LINK 51 51 bool 52 - default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(m64-flag)) if 64BIT 53 - default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(m32-flag)) 52 + default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m64-flag)) if 64BIT 53 + default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m32-flag)) 54 54 55 55 config CC_CAN_LINK_STATIC 56 56 bool 57 - default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) -static $(m64-flag)) if 64BIT 58 - default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) -static $(m32-flag)) 57 + default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m64-flag) -static) if 64BIT 58 + default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m32-flag) -static) 59 59 60 60 config CC_HAS_ASM_GOTO 61 61 def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC))
+1 -1
scripts/gcc-plugins/Kconfig
··· 78 78 source tree isn't cleaned after kernel installation). 79 79 80 80 The seed used for compilation is located at 81 - scripts/gcc-plgins/randomize_layout_seed.h. It remains after 81 + scripts/gcc-plugins/randomize_layout_seed.h. It remains after 82 82 a make clean to allow for external modules to be compiled with 83 83 the existing seed and will be removed by a make mrproper or 84 84 make distclean.
+106 -67
scripts/kconfig/qconf.cc
··· 4 4 * Copyright (C) 2015 Boris Barbulovski <bbarbulovski@gmail.com> 5 5 */ 6 6 7 - #include <qglobal.h> 8 - 9 - #include <QMainWindow> 10 - #include <QList> 11 - #include <qtextbrowser.h> 12 7 #include <QAction> 8 + #include <QApplication> 9 + #include <QCloseEvent> 10 + #include <QDebug> 11 + #include <QDesktopWidget> 13 12 #include <QFileDialog> 13 + #include <QLabel> 14 + #include <QLayout> 15 + #include <QList> 14 16 #include <QMenu> 15 - 16 - #include <qapplication.h> 17 - #include <qdesktopwidget.h> 18 - #include <qtoolbar.h> 19 - #include <qlayout.h> 20 - #include <qsplitter.h> 21 - #include <qlineedit.h> 22 - #include <qlabel.h> 23 - #include <qpushbutton.h> 24 - #include <qmenubar.h> 25 - #include <qmessagebox.h> 26 - #include <qregexp.h> 27 - #include <qevent.h> 17 + #include <QMenuBar> 18 + #include <QMessageBox> 19 + #include <QToolBar> 28 20 29 21 #include <stdlib.h> 30 22 ··· 437 445 if (rootEntry != &rootmenu && (mode == singleMode || 438 446 (mode == symbolMode && rootEntry->parent != &rootmenu))) { 439 447 item = (ConfigItem *)topLevelItem(0); 440 - if (!item) 448 + if (!item && mode != symbolMode) { 441 449 item = new ConfigItem(this, 0, true); 442 - last = item; 450 + last = item; 451 + } 443 452 } 444 453 if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) && 445 454 rootEntry->sym && rootEntry->prompt) { ··· 538 545 rootEntry = menu; 539 546 updateListAll(); 540 547 if (currentItem()) { 541 - currentItem()->setSelected(hasFocus()); 548 + setSelected(currentItem(), hasFocus()); 542 549 scrollToItem(currentItem()); 543 550 } 544 551 } ··· 866 873 867 874 ConfigItem* item = (ConfigItem *)currentItem(); 868 875 if (item) { 869 - item->setSelected(true); 876 + setSelected(item, true); 870 877 menu = item->menu; 871 878 } 872 879 emit gotFocus(menu); ··· 1014 1021 : Parent(parent), sym(0), _menu(0) 1015 1022 { 1016 1023 setObjectName(name); 1017 - 1024 + setOpenLinks(false); 1018 1025 1019 1026 if (!objectName().isEmpty()) { 1020 1027 configSettings->beginGroup(objectName()); ··· 1087 1094 if (sym->name) { 1088 1095 head += " ("; 1089 1096 if (showDebug()) 1090 - head += QString().sprintf("<a href=\"s%p\">", sym); 1097 + head += QString().sprintf("<a href=\"s%s\">", sym->name); 1091 1098 head += print_filter(sym->name); 1092 1099 if (showDebug()) 1093 1100 head += "</a>"; ··· 1096 1103 } else if (sym->name) { 1097 1104 head += "<big><b>"; 1098 1105 if (showDebug()) 1099 - head += QString().sprintf("<a href=\"s%p\">", sym); 1106 + head += QString().sprintf("<a href=\"s%s\">", sym->name); 1100 1107 head += print_filter(sym->name); 1101 1108 if (showDebug()) 1102 1109 head += "</a>"; ··· 1147 1154 switch (prop->type) { 1148 1155 case P_PROMPT: 1149 1156 case P_MENU: 1150 - debug += QString().sprintf("prompt: <a href=\"m%p\">", prop->menu); 1157 + debug += QString().sprintf("prompt: <a href=\"m%s\">", sym->name); 1151 1158 debug += print_filter(prop->text); 1152 1159 debug += "</a><br>"; 1153 1160 break; 1154 1161 case P_DEFAULT: 1155 1162 case P_SELECT: 1156 1163 case P_RANGE: 1164 + case P_COMMENT: 1165 + case P_IMPLY: 1166 + case P_SYMBOL: 1157 1167 debug += prop_get_type_name(prop->type); 1158 1168 debug += ": "; 1159 1169 expr_print(prop->expr, expr_print_help, &debug, E_NONE); ··· 1222 1226 QString str2 = print_filter(str); 1223 1227 1224 1228 if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) { 1225 - *text += QString().sprintf("<a href=\"s%p\">", sym); 1229 + *text += QString().sprintf("<a href=\"s%s\">", sym->name); 1226 1230 *text += str2; 1227 1231 *text += "</a>"; 1228 1232 } else 1229 1233 *text += str2; 1234 + } 1235 + 1236 + void ConfigInfoView::clicked(const QUrl &url) 1237 + { 1238 + QByteArray str = url.toEncoded(); 1239 + const std::size_t count = str.size(); 1240 + char *data = new char[count + 1]; 1241 + struct symbol **result; 1242 + struct menu *m = NULL; 1243 + 1244 + if (count < 1) { 1245 + qInfo() << "Clicked link is empty"; 1246 + delete data; 1247 + return; 1248 + } 1249 + 1250 + memcpy(data, str.constData(), count); 1251 + data[count] = '\0'; 1252 + 1253 + /* Seek for exact match */ 1254 + data[0] = '^'; 1255 + strcat(data, "$"); 1256 + result = sym_re_search(data); 1257 + if (!result) { 1258 + qInfo() << "Clicked symbol is invalid:" << data; 1259 + delete data; 1260 + return; 1261 + } 1262 + 1263 + sym = *result; 1264 + 1265 + /* Seek for the menu which holds the symbol */ 1266 + for (struct property *prop = sym->prop; prop; prop = prop->next) { 1267 + if (prop->type != P_PROMPT && prop->type != P_MENU) 1268 + continue; 1269 + m = prop->menu; 1270 + break; 1271 + } 1272 + 1273 + if (!m) { 1274 + /* Symbol is not visible as a menu */ 1275 + symbolInfo(); 1276 + emit showDebugChanged(true); 1277 + } else { 1278 + emit menuSelected(m); 1279 + } 1280 + 1281 + free(result); 1282 + delete data; 1230 1283 } 1231 1284 1232 1285 QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos) ··· 1447 1402 addToolBar(toolBar); 1448 1403 1449 1404 backAction = new QAction(QPixmap(xpm_back), "Back", this); 1450 - connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack())); 1451 - backAction->setEnabled(false); 1405 + connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack())); 1406 + 1452 1407 QAction *quitAction = new QAction("&Quit", this); 1453 1408 quitAction->setShortcut(Qt::CTRL + Qt::Key_Q); 1454 - connect(quitAction, SIGNAL(triggered(bool)), SLOT(close())); 1409 + connect(quitAction, SIGNAL(triggered(bool)), SLOT(close())); 1410 + 1455 1411 QAction *loadAction = new QAction(QPixmap(xpm_load), "&Load", this); 1456 1412 loadAction->setShortcut(Qt::CTRL + Qt::Key_L); 1457 - connect(loadAction, SIGNAL(triggered(bool)), SLOT(loadConfig())); 1413 + connect(loadAction, SIGNAL(triggered(bool)), SLOT(loadConfig())); 1414 + 1458 1415 saveAction = new QAction(QPixmap(xpm_save), "&Save", this); 1459 1416 saveAction->setShortcut(Qt::CTRL + Qt::Key_S); 1460 - connect(saveAction, SIGNAL(triggered(bool)), SLOT(saveConfig())); 1417 + connect(saveAction, SIGNAL(triggered(bool)), SLOT(saveConfig())); 1418 + 1461 1419 conf_set_changed_callback(conf_changed); 1420 + 1462 1421 // Set saveAction's initial state 1463 1422 conf_changed(); 1464 1423 configname = xstrdup(conf_get_configname()); ··· 1554 1505 QMenu* helpMenu = menu->addMenu("&Help"); 1555 1506 helpMenu->addAction(showIntroAction); 1556 1507 helpMenu->addAction(showAboutAction); 1508 + 1509 + connect (helpText, SIGNAL (anchorClicked (const QUrl &)), 1510 + helpText, SLOT (clicked (const QUrl &)) ); 1557 1511 1558 1512 connect(configList, SIGNAL(menuChanged(struct menu *)), 1559 1513 helpText, SLOT(setInfo(struct menu *))); ··· 1663 1611 void ConfigMainWindow::changeItens(struct menu *menu) 1664 1612 { 1665 1613 configList->setRootMenu(menu); 1666 - 1667 - if (configList->rootEntry->parent == &rootmenu) 1668 - backAction->setEnabled(false); 1669 - else 1670 - backAction->setEnabled(true); 1671 1614 } 1672 1615 1673 1616 void ConfigMainWindow::changeMenu(struct menu *menu) 1674 1617 { 1675 1618 menuList->setRootMenu(menu); 1676 - 1677 - if (menuList->rootEntry->parent == &rootmenu) 1678 - backAction->setEnabled(false); 1679 - else 1680 - backAction->setEnabled(true); 1681 1619 } 1682 1620 1683 1621 void ConfigMainWindow::setMenuLink(struct menu *menu) ··· 1687 1645 return; 1688 1646 list->setRootMenu(parent); 1689 1647 break; 1690 - case symbolMode: 1648 + case menuMode: 1691 1649 if (menu->flags & MENU_ROOT) { 1692 - configList->setRootMenu(menu); 1650 + menuList->setRootMenu(menu); 1693 1651 configList->clearSelection(); 1694 - list = menuList; 1695 - } else { 1696 1652 list = configList; 1653 + } else { 1697 1654 parent = menu_get_parent_menu(menu->parent); 1698 1655 if (!parent) 1699 1656 return; 1700 - item = menuList->findConfigItem(parent); 1657 + 1658 + /* Select the config view */ 1659 + item = configList->findConfigItem(parent); 1701 1660 if (item) { 1702 - item->setSelected(true); 1703 - menuList->scrollToItem(item); 1661 + configList->setSelected(item, true); 1662 + configList->scrollToItem(item); 1704 1663 } 1705 - list->setRootMenu(parent); 1664 + 1665 + menuList->setRootMenu(parent); 1666 + menuList->clearSelection(); 1667 + list = menuList; 1706 1668 } 1707 1669 break; 1708 1670 case fullMode: ··· 1719 1673 if (list) { 1720 1674 item = list->findConfigItem(menu); 1721 1675 if (item) { 1722 - item->setSelected(true); 1676 + list->setSelected(item, true); 1723 1677 list->scrollToItem(item); 1724 1678 list->setFocus(); 1679 + helpText->setInfo(menu); 1725 1680 } 1726 1681 } 1727 1682 } ··· 1735 1688 1736 1689 void ConfigMainWindow::goBack(void) 1737 1690 { 1738 - ConfigItem* item, *oldSelection; 1739 - 1740 - configList->setParentMenu(); 1691 + qInfo() << __FUNCTION__; 1741 1692 if (configList->rootEntry == &rootmenu) 1742 - backAction->setEnabled(false); 1743 - 1744 - if (menuList->selectedItems().count() == 0) 1745 1693 return; 1746 1694 1747 - item = (ConfigItem*)menuList->selectedItems().first(); 1748 - oldSelection = item; 1749 - while (item) { 1750 - if (item->menu == configList->rootEntry) { 1751 - oldSelection->setSelected(false); 1752 - item->setSelected(true); 1753 - break; 1754 - } 1755 - item = (ConfigItem*)item->parent(); 1756 - } 1695 + configList->setParentMenu(); 1757 1696 } 1758 1697 1759 1698 void ConfigMainWindow::showSingleView(void) ··· 1750 1717 splitViewAction->setChecked(false); 1751 1718 fullViewAction->setEnabled(true); 1752 1719 fullViewAction->setChecked(false); 1720 + 1721 + backAction->setEnabled(true); 1753 1722 1754 1723 menuView->hide(); 1755 1724 menuList->setRootMenu(0); ··· 1771 1736 splitViewAction->setChecked(true); 1772 1737 fullViewAction->setEnabled(true); 1773 1738 fullViewAction->setChecked(false); 1739 + 1740 + backAction->setEnabled(false); 1774 1741 1775 1742 configList->mode = menuMode; 1776 1743 if (configList->rootEntry == &rootmenu) ··· 1796 1759 splitViewAction->setChecked(false); 1797 1760 fullViewAction->setEnabled(false); 1798 1761 fullViewAction->setChecked(true); 1762 + 1763 + backAction->setEnabled(false); 1799 1764 1800 1765 menuView->hide(); 1801 1766 menuList->setRootMenu(0);
+17 -10
scripts/kconfig/qconf.h
··· 3 3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 4 4 */ 5 5 6 - #include <QTextBrowser> 7 - #include <QTreeWidget> 8 - #include <QMainWindow> 9 - #include <QHeaderView> 10 - #include <qsettings.h> 11 - #include <QPushButton> 12 - #include <QSettings> 13 - #include <QLineEdit> 14 - #include <QSplitter> 15 6 #include <QCheckBox> 16 7 #include <QDialog> 8 + #include <QHeaderView> 9 + #include <QLineEdit> 10 + #include <QMainWindow> 11 + #include <QPushButton> 12 + #include <QSettings> 13 + #include <QSplitter> 14 + #include <QTextBrowser> 15 + #include <QTreeWidget> 16 + 17 17 #include "expr.h" 18 18 19 19 class ConfigView; ··· 45 45 public: 46 46 ConfigList(ConfigView* p, const char *name = 0); 47 47 void reinit(void); 48 + ConfigItem* findConfigItem(struct menu *); 48 49 ConfigView* parent(void) const 49 50 { 50 51 return (ConfigView*)Parent::parent(); 51 52 } 52 - ConfigItem* findConfigItem(struct menu *); 53 + void setSelected(QTreeWidgetItem *item, bool enable) { 54 + for (int i = 0; i < selectedItems().size(); i++) 55 + selectedItems().at(i)->setSelected(false); 56 + 57 + item->setSelected(enable); 58 + } 53 59 54 60 protected: 55 61 void keyPressEvent(QKeyEvent *e); ··· 256 250 void setInfo(struct menu *menu); 257 251 void saveSettings(void); 258 252 void setShowDebug(bool); 253 + void clicked (const QUrl &url); 259 254 260 255 signals: 261 256 void showDebugChanged(bool);