From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 6B2003857000 for ; Tue, 9 Aug 2022 19:29:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6B2003857000 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660073376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OGb64jzPM8oRcqCDLoIQQ2UiFtVk5kx6MKHNCnNH3J4=; b=abE20S1ZYADz8WFoKMi7z8i9/8W2ea+LBjl8KVGXQk/k2bKh8MTs0jwxellDI4ECdPaLE+ OKMD+rRUJmNeUreLsCjLDcTj5i+x4xfIDxzybtz+sPZuQykiFmpYAYzDwm1X5To/U4glE0 5OCnqC+APXN+/Lsc4PbfyxINoYpoJLU= Received: from mail-yw1-f197.google.com (mail-yw1-f197.google.com [209.85.128.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-50-bzpcnEacPaCl5xuI43qKyw-1; Tue, 09 Aug 2022 15:29:34 -0400 X-MC-Unique: bzpcnEacPaCl5xuI43qKyw-1 Received: by mail-yw1-f197.google.com with SMTP id 00721157ae682-324989683fdso108591577b3.12 for ; Tue, 09 Aug 2022 12:29:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=OGb64jzPM8oRcqCDLoIQQ2UiFtVk5kx6MKHNCnNH3J4=; b=pffEv8bxDVnA3mxgG4HPid62EvBQWaw8Yn86PO3Tc2U1C8ohZIuNEaueRoWQumtKoq mp0GokbLMekJfk2iYEjBh9FvbnFtJoX9GUhLdqwUvhRZXUd07wFDOAAJ6R1OzY2JwtFv 8Dskf5/3qHWC/1bZmZRNKSQgOxJWCGmZc1BzTg/Fbya8XzRM3vz5Qragqv19XKyb6ZJb oCJLLLxGU8ACucl/T/78WX4vq1Tcv+mDXK2N/QFYK4L0ToDK5i+Tzyg2MZpuhAnc1/s3 sxyNiuPwJCoE01SEdFxzkwF2yWLquRj7qGZiuxPxvhGLlHQ5+XOynWm+mJBVIQCm7yRX bnTA== X-Gm-Message-State: ACgBeo39SHGOP7yQQjH2apcFnODwS2AK9yQnoS9ozfhd9UuDgLW7EvRk l/y79F2GagW2+pawtgW2RO9/fG1ZqP0d9PaO1bVBH5TXD+p6jCbs58/9ut/O9/Jv8u9JwrMFhIN /2KYSPOG5hWqDh5WFmzSNEmiwiONuuHA= X-Received: by 2002:a5b:c6:0:b0:671:6b10:dbcf with SMTP id d6-20020a5b00c6000000b006716b10dbcfmr22291026ybp.434.1660073374190; Tue, 09 Aug 2022 12:29:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR5choSqjDAXtPPuPp+GO5o03czcb52RP5sS2iwh2pO3LgHDJyzMp5J7TYoqcPvBotIl9HDjTDWx0YBEGL/fKiU= X-Received: by 2002:a5b:c6:0:b0:671:6b10:dbcf with SMTP id d6-20020a5b00c6000000b006716b10dbcfmr22291010ybp.434.1660073374011; Tue, 09 Aug 2022 12:29:34 -0700 (PDT) MIME-Version: 1.0 References: <720b9093-3afb-677e-771c-77d323ab39fd@imi.moe> In-Reply-To: <720b9093-3afb-677e-771c-77d323ab39fd@imi.moe> From: Jeff Johnston Date: Tue, 9 Aug 2022 15:29:23 -0400 Message-ID: Subject: Re: Newlib provided syscalls on SH To: imi415 Cc: Newlib X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 09 Aug 2022 19:29:38 -0000 Hi Yilin, You will need to patch the libc/sys/sh/Makefile.inc to match what is done in libc/sys/arm/Makefile.inc. This is fairly simple. When you are done, then you can use the --disable-newlib-supplied-syscalls to omit whatever you want in the libc/sys/sh directory. Feel free to submit the patch here when you have it working to your satisfaction. -- Jeff J. On Mon, Aug 8, 2022 at 3:56 AM imi415 via Newlib wrote: > Hi all, > > I'm trying to build newlib for SuperH(sh) architecture, and the syscalls > under the "newlib/libc/sys/sh" directory > > are built no matter whether "--disable-newlib-supplied-syscalls" is > provided.The target is a bare-metal target > > so I need to provide these syscalls myself, same as other bare-metal > targets do. > > I have checked the Makefile.am under the directory and there seems to be > no special treatments for the "MAY_SUPPLY_SYSCALLS" option. > > Do I have to patch newlib for this or is there another way overriding > these syscalls? > > P.S. The build environment is generated by Crosstool-NG. > > > Thanks & Best Regards, > > Yilin Sun > >