Received: by 10.192.165.148 with SMTP id m20csp162924imm; Fri, 20 Apr 2018 04:56:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx49ieVcZukmcevUF98F9V9PAbzlh25cW9UUkXsrMyDDiDk4WxqsYdx/ZkyVYPVD+2i9LJmiM X-Received: by 10.99.125.86 with SMTP id m22mr8590214pgn.257.1524225415381; Fri, 20 Apr 2018 04:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524225415; cv=none; d=google.com; s=arc-20160816; b=ARiNfsGXH6Mr+3pFxXXJvxpw93dfHVhaqScvQr0ZZHBbU6NgJMkzSLaMpRJUhDmyQr l24VlLREt8ndCr17xN9pOCUw3weQPeLhfK0fV6F4O33adoZIUT0/YAgNvXLgCCSFRoy6 ef40wJn1GFo4c/RnOYE82n/KMW+HpS39MMEaLOMoDp/A3Ac/xuf+tsMg9AHR5i0NbKAt d7SbVpasdWGXiDj6wy3gSoE0AKrwuQq4blcDQ04zlXlghZO2JBnz8rdn59uZwgqmJdGP pddYCgOYhOcvoN+eZAsxE6PuLa500WRkmHyg5SJuS1A0NsIjFk1Avua2utc6gMwPorcj WGZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=U7fOb0eMQMO0MWF9gL93lRqqguNf2nGuiznBzt5OBw4=; b=lvIfVFsGPohkTmlih9dR6bTMPbBUGjO29NbwgsWvTO+9kB43WFzcjK6E03CH3h21Ic RIcmc5dGeU/P8gwrC3GXZXHCLEteSZsbvBsSuUcS1yJkXVPsNhzsbXdibCDx6T3yx3Vr 6vDp4boa8S7+i5kLII/BwMB35BJdm1HSxPqj0reDExjx+LCTcK2sJCCd1G5WAxVjXad2 AW0ECHZPDn/0CK9rmRLON/Z9AxtOLbbb6Mu6wEg3oWESwFZzgLZnJ1Qs5j0VqL69JkZ5 VofnwbmhDZ8piurYdV8V+RGfXEZzT72AhI3/Z+WZrnitMCAT0g2E2Kole1L42/wrPfEn MAPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TzncWtwU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u19si5109419pfn.213.2018.04.20.04.56.41; Fri, 20 Apr 2018 04:56:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TzncWtwU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754746AbeDTLze (ORCPT + 99 others); Fri, 20 Apr 2018 07:55:34 -0400 Received: from mail-ua0-f196.google.com ([209.85.217.196]:36578 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754631AbeDTLzc (ORCPT ); Fri, 20 Apr 2018 07:55:32 -0400 Received: by mail-ua0-f196.google.com with SMTP id v4so5523553uaj.3 for ; Fri, 20 Apr 2018 04:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=U7fOb0eMQMO0MWF9gL93lRqqguNf2nGuiznBzt5OBw4=; b=TzncWtwUK9Et+WfPUye7cwwhRyKFEs8LWoOv4ETx952Lo/5z/Sux8QtVXOxX69GDCm AcDJQ7dbYBKHLWSHXiBIyTfqxO92lEOozqtW679R8pbVMtEez4XeH7A4NOMncLHg3at1 fBj8DMrHSyq2YRVHGJtsWG78ay1WEblvKKEfBpiaQigI8ESIp/rMNeFaY0fZukCFC4xZ I5sLuduKAIjeURMY87y7kswTnYO0eejw+pmy+oX8FJkenwFqBjkPgPVqcexkYFaap7G6 82FTJOOsR94oACXPOEAaGdMqeQef2/sHjTq5HbiGYwxMkpsWUgAzDtu688qHNCixxcVU xzrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=U7fOb0eMQMO0MWF9gL93lRqqguNf2nGuiznBzt5OBw4=; b=NX/ttGejp3t8bTUr5968MNChbp4eTnhHRSC00QQj/6eCWsFAm5aNy4HSncbikRPT/U GojQhyGDPp+2nWlskfEUZzfXcVyIQry1Gi3LxEICfLjt/dDKOgE8ZO0bmcIvs6YtoFuy CgsRt6wOT7SQvkFtTsxSOe3cg4mdrGLOrFTaMPZm2Y/Ojm66ID4hIG3bs6E+WXCsYoUm p8kYy5dUXpPRktxfJhNSWJ1ZPTbGgxJjTPyZ/P1U6pIotX54AbtE/TimC0KUcZyEB1SV O+GUy0dePjW/weJmX4uK9apvlmSjyZcwsaRf21g6T9XOSpZFWq5r7P44mhb8qLer2Zxc s50Q== X-Gm-Message-State: ALQs6tD0uowCkxlV3k5nIVObapwqYWPxI2dQkBWsMbpTiAjFgmdmjykE ifnHvD31+5aGPuDhnww1t3NKScFj7VD2wW+OGdU= X-Received: by 10.176.87.193 with SMTP id u1mr7589639uac.1.1524225331549; Fri, 20 Apr 2018 04:55:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.92.86 with HTTP; Fri, 20 Apr 2018 04:54:51 -0700 (PDT) In-Reply-To: <20180419183840.GA500@roeck-us.net> References: <21ef6561299cdbbe0f3571c5048a2eaf5eb43bc7.1524143428.git.greentime@andestech.com> <20180419183840.GA500@roeck-us.net> From: Greentime Hu Date: Fri, 20 Apr 2018 19:54:51 +0800 Message-ID: Subject: Re: [9/9] nds32: Fix the allmodconfig build. To make sure CONFIG_CPU_LITTLE_ENDIAN is default y To: Guenter Roeck Cc: Linux Kernel Mailing List , Arnd Bergmann , Greentime , Guenter Roeck Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-04-20 2:38 GMT+08:00 Guenter Roeck : > On Thu, Apr 19, 2018 at 09:18:15PM +0800, Greentime Hu wrote: >> This way we can build kernel with CONFIG_CPU_LITTLE_ENDIAN=y and allmodconfig >> will be available. >> >> Signed-off-by: Greentime Hu > > As Arnd suspected, this causes allnoconfig to fail. > The failure is due to endianness mismatches in vdso code. > > Not sure if that is really an improvement. > Thank you for reviewing. The reason of this issue is because some objects are compiled with -EL and some objects are compiled with -EB to cause endianness mismatch issue. It happened because AFLAGS and LDFLAGS is not passed correctly. I will send the 2nd verson patch to fix this issue. Yes, allnoconfig is fine after applying these fixes. diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile index 20edf34e70ce..513bb2e9baf9 100644 --- a/arch/nds32/Makefile +++ b/arch/nds32/Makefile @@ -32,8 +32,12 @@ endif ifdef CONFIG_CPU_LITTLE_ENDIAN KBUILD_CFLAGS += $(call cc-option, -EL) +KBUILD_AFLAGS += $(call cc-option, -EL) +LDFLAGS += $(call cc-option, -EL) else KBUILD_CFLAGS += $(call cc-option, -EB) +KBUILD_AFLAGS += $(call cc-option, -EB) +LDFLAGS += $(call cc-option, -EB) endif --- greentime@atcsqa02:/sqa2/greentime/contrib/travis/build_script/src_pkg/linux $ nds32le-elf-readelf -h vmlinux ELF Header: Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, big endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: Andes Technology compact code size embedded RISC processor family Version: 0x1 Entry point address: 0xc000 Start of program headers: 52 (bytes into file) Start of section headers: 905772 (bytes into file) Flags: 0x30000242, AABI, Andes ELF V1.4, Andes Star v3.0, PERF1 Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 4 Size of section headers: 40 (bytes) Number of section headers: 18 Section header string table index: 15