From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20076.outbound.protection.outlook.com [40.107.2.76]) by sourceware.org (Postfix) with ESMTPS id F3EDE388A83A for ; Thu, 30 Jul 2020 15:28:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F3EDE388A83A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Szabolcs.Nagy@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yLUft05hfdsyLpkEo78zv3iOsf6J4lQTsTjOYjIrhyQ=; b=41QI04V2CrQUCMJwMTVxFExGshK+Qt0iJ1S/5sK0rjWzkJ87tj0L+MdJa9/Tq5wlUHTlA5HnbkqrDDiFLadoQzkyeGqvXs6pNjwE/jJfwLv1O+wueCjUmNVuo/cbedFF6CrOEox7XOKp3N1g490lhOAVc/r+IMp0JaSal0mw7Qk= Received: from AM5PR0402CA0018.eurprd04.prod.outlook.com (2603:10a6:203:90::28) by DBBPR08MB4630.eurprd08.prod.outlook.com (2603:10a6:10:d6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.20; Thu, 30 Jul 2020 15:28:07 +0000 Received: from AM5EUR03FT058.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:90:cafe::ec) by AM5PR0402CA0018.outlook.office365.com (2603:10a6:203:90::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.18 via Frontend Transport; Thu, 30 Jul 2020 15:28:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; sourceware.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT058.mail.protection.outlook.com (10.152.17.48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20 via Frontend Transport; Thu, 30 Jul 2020 15:28:06 +0000 Received: ("Tessian outbound 1dc58800d5dd:v62"); Thu, 30 Jul 2020 15:28:06 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2ecc7aa25d8d765e X-CR-MTA-TID: 64aa7808 Received: from da32abb7c2f9.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1ED77905-A59B-47BF-B2D4-9EB12AA85868.1; Thu, 30 Jul 2020 15:28:00 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id da32abb7c2f9.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 30 Jul 2020 15:28:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bsQKaz1gHp/+TDjnZbRgnVU9szZkd7wo08zb1vYDj/bxKCogHrEfkIPxVGfvTxe3jfbkgkqyUY4wdOhm/8Cxj12Emkk+Sbb1AT5vV4x9pmJU1Y/VcITCFJZDyI+PLErSbc5NvZTTaU1/zrSGT03XY5D7kH+HSlDTnGO9D9Mqhmp3LmdwVQLo2UrPgbKXvPCo+3pVoWma0RhOWSAs+/frfaxM6ZR9AslKoQaQqdH3uN/yoflM5rb9MG/CEtsTWkG5Htw/5v+5XhjcWCJOFF0m2POWVWQkEyVxddB/UsCbifa1mrumUuI/QEb/lFrme9+bw7av6SuU2cwizzpj5TJFWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yLUft05hfdsyLpkEo78zv3iOsf6J4lQTsTjOYjIrhyQ=; b=EuDN2ZB2Jwg5k8AYUn/eJeRVw/qbYgB2bcEaV+v2i6GEi1RLMgcq/kSbjcjFdWZonscJiKoOv1HuGRjtqli4MA3u9T8dL/IUR/bKdS4kAzTvyKz7TU9oZ1TMzz8m7fGC2jhi4i7TPAs8IGXqlVSffJMNCC9S33uo/IxC1jzwODSxumPkVDz8UGTPubP0X6cYpi5nU5GuF6GsZRgv936mARl7mO4swkBJxAycWmmDhkyNcDR56oy0SqDLOG0pwmh6QmmyurUDHCaUyuF3cFvUZUkDkBsTAksivFWFymlUlahbvSpTia5zc0vRLqR+XKdR1YicbJcm6I45TgoJAPnCIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yLUft05hfdsyLpkEo78zv3iOsf6J4lQTsTjOYjIrhyQ=; b=41QI04V2CrQUCMJwMTVxFExGshK+Qt0iJ1S/5sK0rjWzkJ87tj0L+MdJa9/Tq5wlUHTlA5HnbkqrDDiFLadoQzkyeGqvXs6pNjwE/jJfwLv1O+wueCjUmNVuo/cbedFF6CrOEox7XOKp3N1g490lhOAVc/r+IMp0JaSal0mw7Qk= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) by AM5PR0801MB1747.eurprd08.prod.outlook.com (2603:10a6:203:36::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16; Thu, 30 Jul 2020 15:27:58 +0000 Received: from AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c]) by AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c%6]) with mapi id 15.20.3239.019; Thu, 30 Jul 2020 15:27:58 +0000 Date: Thu, 30 Jul 2020 16:27:56 +0100 From: Szabolcs Nagy To: Richard.Earnshaw@arm.com, "newlib@sourceware.org" , Niklas DAHLQUIST , Torbjorn SVENSSON Subject: Re: [PATCH] Implemented sysconf for Arm Message-ID: <20200730152755.GD24636@arm.com> References: <20200729154335.GK4206@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200729154335.GK4206@calimero.vinschen.de> User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: LNXP265CA0083.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:76::23) To AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.53) by LNXP265CA0083.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:76::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.19 via Frontend Transport; Thu, 30 Jul 2020 15:27:58 +0000 X-Originating-IP: [217.140.106.53] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4f17c6f1-83de-486f-c361-08d8349d2865 X-MS-TrafficTypeDiagnostic: AM5PR0801MB1747:|DBBPR08MB4630: X-LD-Processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 0DRV4l5KoVlpdcsE1khXLxB0m5hoRZ/IUt/OEauyTVxSBTCKMS6O/27I91OWVDLHj7DMy9KpwcVW287qntAmPAvGCOVXAaNQbMGqTMKaYX1Bf4MoLTVlz44iC2MGQN8sUpNRy/bKeUGe/ZVhCB7Dai6byDl1HXNH9S9YYiB6HK9mfxWPfAufXcCaO6FVO27nfSY7vHa5m/uoKCMyDd0Kjo+BAQ+w5cm2epjArxWiBqS4+4aGWTlZf6Pjb3610fYHsiobyYi/hnwcT1dra2o1RMdVS0D2Z3sMMAmYdxix47nHt3jFG8Y/YYBQiIm9Uz54 X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR08MB3047.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(366004)(396003)(346002)(376002)(136003)(110136005)(8886007)(66476007)(66946007)(2906002)(66556008)(5660300002)(8676002)(316002)(8936002)(83380400001)(36756003)(956004)(1076003)(86362001)(478600001)(53546011)(52116002)(7696005)(44832011)(33656002)(2616005)(66574015)(186003)(26005)(16526019)(55016002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: lHCvqFwpewXaUU+/23d06HUXI5vZG3O7BzMI0RKuSk6tsGs9mCiLo5mrxz6vGFvbnxWu8kDrk5kVo15CAayG97b97O2/ofEls2SUDsodrc2fLw581RUvpP6oD1b7/u93kfNdm6Inu/YIUHi74kpZ0JXxfwXFEWt5a0lDQ0n/KfmQ2v8NVfT0I8DQc7qEeq3sJpb1D+LuwycZTCI0m0WuEnvNAGMcvo28aNUwSQVdJlVzIgWwLvOkhNPplfs1rNuQmBJvbDrK6gsSPR/t7qu6kzxfD0yZPHH+RrZFGVJKL/TLdH6Rba9RroJwU0iDEFLmJaJDbFWB1pDEjBjkI8OUx2xTwz2/5zVcuZ3la5aT2sdFctfSyBjsoIgbWQf38qTLmFac7XomfJbNVLwEqTCl012ufu5Eox+/EtBWOyl2jQPS0fzEWGP9DXn5XLCP2KS0oJuLkJOth230WCTow3nad7ZkqKMi4XxuQY8Z1Ub2r/2gz9JluQGaCTiXkvsbOSHVG85SaSn469na8cZuROsFSN0ZQfuEEg8GKqcgJz/uwq6iAfEyUuovV9kcSaufvMrJ9eLuOcntliO6yilagKGxOVObIQMbG4Njo58r2c6EjF8M7vrE3AVHZ/q+RpM7RE1fyOvq4qa4n1zlWezY78i3ug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1747 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT058.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 47a70ff6-e297-428c-83bb-08d8349d2370 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: q0C2EN5q5StELnOs4SY+2gEMZVronnR80p3RgQ0HYq12bpv2Ksii2rcdGGO/OThCWhg32LLIv9Xowtk4qu7pcUOzx4sLgsp/qy/Yi22DqCGuKzmtynYGV1Y7/lWWIYe+PeLbo7lstJGvuHuZRlrn/x6f0/9c55j5ffCBpZ3xb3gT4wNBe50EUEqoEKX6y71hoEUKpFmUrOwmOV17oUX9Y1RSEYZOW521OZhaLJtas0LuOwPNxTHtMhYKqP211UIG3z9lY68LDA8MZFcJNLjXuoiG8SiZG3sTnwwlTJLTHRzuvQ6xEbFX1v2KBYmA6ICIRrCsZaSos7zp0VhFaa9AOfs/S/EG09Dx57w9kNh+IMJp0/mY48otE3QJw9np8zRfn+Metd4YArAkSBsbqa0vOg== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(396003)(346002)(376002)(136003)(39860400002)(46966005)(316002)(44832011)(83380400001)(2906002)(956004)(81166007)(1076003)(55016002)(36906005)(16526019)(26005)(8676002)(53546011)(33656002)(186003)(82740400003)(110136005)(7696005)(2616005)(66574015)(5660300002)(336012)(82310400002)(70586007)(8936002)(36756003)(356005)(70206006)(47076004)(478600001)(86362001)(8886007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2020 15:28:06.4493 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4f17c6f1-83de-486f-c361-08d8349d2865 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT058.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4630 X-Spam-Status: No, score=-15.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2020 15:28:12 -0000 The 07/29/2020 17:43, Corinna Vinschen via Newlib wrote: > And again adding Richard. > > Richard, is nobody from ARM looking into this stuff, at least once in a > while? i don't know what's the best way to do link-time or run-time configuration of newlib internals. it seems to me that malloc allocation granule does not have to use page size as defined in the arm architecture nor page size as defined in posix nor page size as defined in the elf abi. so ideally there would be a hook with different name that users can link-time override. (so there is no danger of something trying to use _SC_PAGESIZE or sysconf in general for something else that conflicts with the malloc usage) but if currently sysconf is only used by malloc in newlib then i guess the patch works (i'd add a comment though that it is the malloc block size and not a property of the memory system). > > > Corinna > > > On Jul 29 15:26, Torbjorn SVENSSON via Newlib wrote: > > Ping3 > > > > -----Original Message----- > > From: Torbjorn SVENSSON > > Sent: den 19 maj 2020 18:17 > > To: newlib@sourceware.org > > Cc: Niklas DAHLQUIST > > Subject: RE: [PATCH] Implemented sysconf for Arm > > > > Ping2! > > > > If it's not clear to the reviewer, the use-case that we want to fulfill here is to be able to override the page size for the malloc() call for the project and not require a new build of newlib. > > With this approach, simply re-implementing the function sysconf(int) in the application to return the appropriate page size for the application and have the linker will select the local implementation over the newlib provided one is enough to reserve a smaller memory block for malloc. > > > > I also need assistance to push the patch since I've not got commit access. > > > > Thanks. > > > > Torbjörn > > > > -----Original Message----- > > From: Torbjorn SVENSSON > > Sent: den 7 maj 2020 10:29 > > To: Newlib > > Cc: Niklas DAHLQUIST > > Subject: RE: [PATCH] Implemented sysconf for Arm > > > > Ping > > > > -----Original Message----- > > From: Newlib On Behalf Of Torbjorn SVENSSON via Newlib > > Sent: den 27 april 2020 17:31 > > To: newlib@sourceware.org > > Cc: Niklas DAHLQUIST > > Subject: [PATCH] Implemented sysconf for Arm > > > > The default implementation can be overridden outside newlib to allow a > > different page size to improve malloc on devices with a small footprint > > without needing to rebuild newlib. > > > > Signed-off-by: Torbjörn SVENSSON > > Signed-off-by: Niklas DAHLQUIST > > --- > > newlib/libc/stdlib/mallocr.c | 2 +- > > newlib/libc/sys/arm/Makefile.am | 2 +- > > newlib/libc/sys/arm/Makefile.in | 12 ++++++++++-- > > newlib/libc/sys/arm/sysconf.c | 20 ++++++++++++++++++++ > > 4 files changed, 32 insertions(+), 4 deletions(-) > > create mode 100644 newlib/libc/sys/arm/sysconf.c > > > > diff --git a/newlib/libc/stdlib/mallocr.c b/newlib/libc/stdlib/mallocr.c > > index 26d1c89cc..28d278f51 100644 > > --- a/newlib/libc/stdlib/mallocr.c > > +++ b/newlib/libc/stdlib/mallocr.c > > @@ -316,7 +316,7 @@ extern "C" { > > # undef WIN32 > > #endif > > > > -#ifndef _WIN32 > > +#if !defined(_WIN32) && !defined(__ARM_EABI__) > > #ifdef SMALL_MEMORY > > #define malloc_getpagesize (128) > > #else > > diff --git a/newlib/libc/sys/arm/Makefile.am b/newlib/libc/sys/arm/Makefile.am > > index 711872de3..9111f3647 100644 > > --- a/newlib/libc/sys/arm/Makefile.am > > +++ b/newlib/libc/sys/arm/Makefile.am > > @@ -14,7 +14,7 @@ else > > extra_objs = > > endif > > > > -lib_a_SOURCES = access.c aeabi_atexit.c > > +lib_a_SOURCES = access.c aeabi_atexit.c sysconf.c > > lib_a_LIBADD = $(extra_objs) > > EXTRA_lib_a_SOURCES = trap.S syscalls.c libcfunc.c > > lib_a_DEPENDENCIES = $(extra_objs) > > diff --git a/newlib/libc/sys/arm/Makefile.in b/newlib/libc/sys/arm/Makefile.in > > index c01e4e2ed..67fb695f5 100644 > > --- a/newlib/libc/sys/arm/Makefile.in > > +++ b/newlib/libc/sys/arm/Makefile.in > > @@ -70,7 +70,8 @@ ARFLAGS = cru > > lib_a_AR = $(AR) $(ARFLAGS) > > @MAY_SUPPLY_SYSCALLS_TRUE@am__DEPENDENCIES_1 = $(lpfx)libcfunc.o \ > > @MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)trap.o $(lpfx)syscalls.o > > -am_lib_a_OBJECTS = lib_a-access.$(OBJEXT) lib_a-aeabi_atexit.$(OBJEXT) > > +am_lib_a_OBJECTS = lib_a-access.$(OBJEXT) lib_a-aeabi_atexit.$(OBJEXT) \ > > + lib_a-sysconf.$(OBJEXT) > > lib_a_OBJECTS = $(am_lib_a_OBJECTS) > > DEFAULT_INCLUDES = -I.@am__isrc@ > > depcomp = > > @@ -183,6 +184,7 @@ pdfdir = @pdfdir@ > > prefix = @prefix@ > > program_transform_name = @program_transform_name@ > > psdir = @psdir@ > > +runstatedir = @runstatedir@ > > sbindir = @sbindir@ > > sharedstatedir = @sharedstatedir@ > > srcdir = @srcdir@ > > @@ -198,7 +200,7 @@ AM_CCASFLAGS = $(INCLUDES) > > noinst_LIBRARIES = lib.a > > @MAY_SUPPLY_SYSCALLS_FALSE@extra_objs = > > @MAY_SUPPLY_SYSCALLS_TRUE@extra_objs = $(lpfx)libcfunc.o $(lpfx)trap.o $(lpfx)syscalls.o > > -lib_a_SOURCES = access.c aeabi_atexit.c > > +lib_a_SOURCES = access.c aeabi_atexit.c sysconf.c > > lib_a_LIBADD = $(extra_objs) > > EXTRA_lib_a_SOURCES = trap.S syscalls.c libcfunc.c > > lib_a_DEPENDENCIES = $(extra_objs) > > @@ -288,6 +290,12 @@ lib_a-aeabi_atexit.o: aeabi_atexit.c > > lib_a-aeabi_atexit.obj: aeabi_atexit.c > > $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-aeabi_atexit.obj `if test -f 'aeabi_atexit.c'; then $(CYGPATH_W) 'aeabi_atexit.c'; else $(CYGPATH_W) '$(srcdir)/aeabi_atexit.c'; fi` > > > > +lib_a-sysconf.o: sysconf.c > > + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sysconf.o `test -f 'sysconf.c' || echo '$(srcdir)/'`sysconf.c > > + > > +lib_a-sysconf.obj: sysconf.c > > + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sysconf.obj `if test -f 'sysconf.c'; then $(CYGPATH_W) 'sysconf.c'; else $(CYGPATH_W) '$(srcdir)/sysconf.c'; fi` > > + > > lib_a-syscalls.o: syscalls.c > > $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-syscalls.o `test -f 'syscalls.c' || echo '$(srcdir)/'`syscalls.c > > > > diff --git a/newlib/libc/sys/arm/sysconf.c b/newlib/libc/sys/arm/sysconf.c > > new file mode 100644 > > index 000000000..86a324fa4 > > --- /dev/null > > +++ b/newlib/libc/sys/arm/sysconf.c > > @@ -0,0 +1,20 @@ > > +/* libc/sys/arm/sysconf.c - The sysconf function */ > > + > > +/* Copyright 2020, STMicroelectronics */ > > + > > +#include > > +#include > > + > > +long sysconf(int name) > > +{ > > + switch (name) > > + { > > + case _SC_PAGESIZE: > > + return 4096; > > + > > + default: > > + errno = EINVAL; > > + return -1; > > + } > > + return -1; /* Can't get here */ > > +} > > -- > > 2.18.0 > > -- > Corinna Vinschen > Cygwin Maintainer > Red Hat > --