From patchwork Mon Apr 1 12:16:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Lapshin X-Patchwork-Id: 87880 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EE17B3858424 for ; Mon, 1 Apr 2024 12:17:22 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2126.outbound.protection.outlook.com [40.107.117.126]) by sourceware.org (Postfix) with ESMTPS id 7F2FB3858D39 for ; Mon, 1 Apr 2024 12:16:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7F2FB3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=espressif.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=espressif.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7F2FB3858D39 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.117.126 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1711973807; cv=pass; b=pkS4LMT4cMWLmKpsYA/JYQ+fxZJezZHxX/hdCdDQLeJuh45ZnLmpM98ySQtQu5QKDQsPfkyDITs2inP0bsaE8qfWSRHGSBmyHf1DBKN/6DDK6dBA4vNcOTLqOp3zsB8GX/6eyP1ZjJMg8uZtD8FSUKbsjfZ4uFcilr4pvR8jSao= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1711973807; c=relaxed/simple; bh=NHfcGmWZ0yzADceH+Kw5lgNMA4GhSCfsw1apGY0rS0Y=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=x4mNzOClmWI/Yd0GpukzqS6RN882JNSFonOZQZJxAHMzfu4Tkm0nigGsKDtLfAb+KDzCBjtrdh9SrQKAuywUIbZQMMx5Oy53qRcPZBJ4Zwj9JdqGBB5ibqEBecAzlWoTZhXDi2IQWuNFo6YmRiaBbgAxyfytlImHZ5aSVjQiNLA= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IZAWRGpL9UBM3BIFkNjkEg5dvVaJcgiK9CArJvyF6JAcS41nwZhJbHICca5WQNqM2/MXX8NTMNAWcy7ePgv7aOQYZ7RmKqrMaULB/gPQLCYxJvT3qioSJlPdcsrxySWQN9gNCNV7ImpTRirUq4RWApPxnULeKZLgBRuSUqk8jvL2OCy7JIWoAUhp6gvVQvKNWLmJvp+3fFyfCrYwoEChIZEeEXro5nHdzaAR6ZoBr3FG2EetAHtCkiDpNvxIwETG/PxT8peWXMWHAzS/0fJmivuke7hZa5WbeQS15hfFPuIVXn2KZ50hFWJTFs5TVc2gi0TpWjViiqihgVwgz1NPKw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NHfcGmWZ0yzADceH+Kw5lgNMA4GhSCfsw1apGY0rS0Y=; b=jTY46U60rl2IauHTeUEWjI1CyklKznhls+owxLVb3KbXmJeDb082M63480vXxKZcn25QKgIaGfdAhO14P12YkpfLvaCfA+ZkETtc8O2dUq2lBxVYowOx+MckIXm1Vfao51k8fn/FrNmdd/zfpbV3Fk0pZI2Jmk++zOvR16s5kz+2iwB8V6C4K33MYmO6Pv4qWfHc711SAAkyWAzCVf+VTcMoGtir43Ihl5/5iEE1GHVoIZ/f9VodXcKYefEF1Uq9q6tO60lPuNgI4ryDw9DVYifsmXPTwOUDOOoOiTnIsR4nmb2NCL8nu9VIU/gzPDhjla5q1s28c0hJYeJ8bfA9yg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=espressif.com; dmarc=pass action=none header.from=espressif.com; dkim=pass header.d=espressif.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=espressifsystems.onmicrosoft.com; s=selector1-espressifsystems-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NHfcGmWZ0yzADceH+Kw5lgNMA4GhSCfsw1apGY0rS0Y=; b=N0hCZM0gQDM+3bkOm0h3bbmhMAhxA2rc4OzxRdwIp8zc4jCWrV5LqBgmmfbY/MNYkRMuiLsUMKJfYY1Y60E+cDtF8zSzJGKPFrGLq2OellDdnA+gUrKz3SvFikfCmY+w6dd94HLd2IE2Eknmt4IcCS190S5Wugniflj+urDj4zU= Received: from TYZPR04MB5736.apcprd04.prod.outlook.com (2603:1096:400:1fa::7) by KL1PR0401MB6307.apcprd04.prod.outlook.com (2603:1096:820:b9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.45; Mon, 1 Apr 2024 12:16:39 +0000 Received: from TYZPR04MB5736.apcprd04.prod.outlook.com ([fe80::dd14:d91e:da7c:1a6d]) by TYZPR04MB5736.apcprd04.prod.outlook.com ([fe80::dd14:d91e:da7c:1a6d%7]) with mapi id 15.20.7409.042; Mon, 1 Apr 2024 12:16:38 +0000 From: Alexey Lapshin To: "gcc-patches@gcc.gnu.org" CC: Alexey Gerenkov , Ivan Grokhotkov , "jcmvbkbc@gmail.com" Subject: [PATCH v2 1/2] gcc: xtensa: add mdynconfig option Thread-Topic: [PATCH v2 1/2] gcc: xtensa: add mdynconfig option Thread-Index: AQHahC5yyYsk0JMZ7UmBCewBFeEcXw== Date: Mon, 1 Apr 2024 12:16:37 +0000 Message-ID: <67280210800347ca0dc716816159e79d402676d1.camel@espressif.com> References: <485a6a6c62a8632d9e3ac44b2d8fd935c0e0a78b.camel@espressif.com> In-Reply-To: <485a6a6c62a8632d9e3ac44b2d8fd935c0e0a78b.camel@espressif.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: TYZPR04MB5736:EE_|KL1PR0401MB6307:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: XZhxS0QYyW/+K89JB7wapG6zBg/y/tnxxHrAItZeFEjKdEmMCDUR21QED+cnvexcGM9gOx3aWKqTF4u8LBHJHziShg5LZ6j5RInAsy7wxEuN3RxUFbyAdHBLoE23TgmM2qhq4wXCxuOOW1f+onmJhWJeX9qaEC8pSzrquo1HhGUSF7/IY3PgjPe7O1GYyoXsEaSa4qwQKxedWaPG81Fg2awt6FlqfMi442jSPhl/IAjUK6ICmd/qFc+sWurrq+mh60m94b1U9/INl8D6oSkzpHl/Rru1ENq9gH61q+12CKkuu1nHarTah+3DCxhSEPZb5OQQp8cVzShktTT9FPt8/Lsx6nzXdGsyWxv+MM/UCE1el795bJDmY/VGgpDINWXL1ENc5PI5r6ZTIofRlkq1Q6hxtTnBm3iqpqGGQTSczIDyB9EFhhzdmFB5tHxIZpGxBjVQIsbtPph3dOXSofdf9Q0ovoUOkgNn7hnEZQxFkNr41ZnaPc2AlzofCHZW0sJnb6SbMMBKRd2UHk3WF5tUsiHX1/EKk7UuGEC+VudQfqcmwu+fisAuKvcbOLj/EDZiy+FDqcGTyOn1kxohk4NbKczLeMAs61ot/FoD3AsSWX9pezuAiHTUWmy90t3+8E1Ruo8ejKoT8pstQXXftKJYHDz5Roi1MbgMDIVeKNJ1mYE= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYZPR04MB5736.apcprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(366007)(1800799015); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?QGjyRaEXm77AOhmllZHf6X2JCLoK?= =?utf-8?q?gRRosPhLnk/qxzvWeFMjPWDJVQArftjiP7by1oW5VIJnPGTmIyxb04Z8Adhe0/CB5?= =?utf-8?q?Q8DhklRILsjV3doQ0Siz+PEcviLHFLBI/JI1KwYq1mWYG+6icwdoq+8lBklQ5KHTP?= =?utf-8?q?XmozIHissFrQvWU8L5QOj+VyUXI1FzRvEFBmJyD0ywTEta4Ia21nqiIkdPf0WF4Bw?= =?utf-8?q?tSTVPyn0nLvpcWHBupJB8g2rIwPhNHK73J1R1ad+7XTngOtNBeh2bdB/N+ZRfPK89?= =?utf-8?q?J1TtoywY4BpgtISxPY16/QNvZW0N/VlKgUyelhBURm8oosaQkCdys0QVWIRfprrxI?= =?utf-8?q?nIfNa6BkhTfq8Uzw3J3hO5CZ0VsrGLPntPG8ArFJFqpQukMWuNUv7mBO6aSKAwWy1?= =?utf-8?q?6Lom+b75dczo1NSckKPD6IMShjLWplSCQJSlfGJ9Bmz7vlm7Qo/uwUSlTbqbNNMoi?= =?utf-8?q?xTrJ5PSDi1K9yZ96VZrtMZdxNwFDF0STLnYH7MUAAoHSTCxsEYQ0SgchUyw3E8ET9?= =?utf-8?q?yuoPwL/ArJ5+vl14NTOJrOX66Lmp9mrLEuH8IbgRGblxScFKLAq6gEJ2lQEzX8igj?= =?utf-8?q?Zbksoi0Y3QFxFZrvnQMC00jcd7daWq9/AT3Z6cZppnFPm2o9NRjsns61b2Z6vKWah?= =?utf-8?q?trCHPP0YFUlSPWt6Sgs6eLf9iRmYZuC2p/J0wIsr8DgnfwUswAuC0u6P+H4Mq9yAM?= =?utf-8?q?U8+Nx99ERoI20U/+DDQ/8E1Vmn4xs29iKszMcsdxfEBLeouuA4Cl4eqxftCQvWz3E?= =?utf-8?q?JLvhPgl7R0lKV8X3PgH9NG7IISqlMgzWX2qBRj8v7L0xmvlaT/436casxMuSmgXpb?= =?utf-8?q?nSp2KKmJUiZqYjvO3p9USLBGAsTUfnTTQ1Xy2lFgNv5wdzWJXnQC5s1Z5eaDV3iln?= =?utf-8?q?3bo+CgEx5YUQp/n3c2/KW79PQmmDxlRzrqsGQPDzPfWOmDFWAuTMfjaQliXU/NLlu?= =?utf-8?q?5tAme+yhSYTupOi+kbAnPDH8b8qoJx2mXjiVkhj66CrQuDM+8cBi8xd8p2BujFWPk?= =?utf-8?q?2O6r7fOgjulKUfcqpODcFRcM4ijoiZrC1m2dANECsSXhe0gkiqURt8Kwfb4t+SebW?= =?utf-8?q?IwiYM7EbnDKeAVnqS9tfEqgAFueBmu+VoShNGjhXWaKJyAwyfMC3VrrCHvYpZ7iqU?= =?utf-8?q?pda/Uwv7eiuyewWjpyCzyuNiIB3G5QbI7WI1NGzMj1W1QAiBOix68BHA1kKG8oXBe?= =?utf-8?q?mdkmiNEeD/3DJAiWF3vvUMdvbjmzBMfuEClE6JAi3LE8hwq+C2vnK71PxLqD11Ljt?= =?utf-8?q?D0K3Q8X9pV8BY+kHkJU036hdQV56UUu+VAJaknKdpjSmhGEj58KXgafFFphOCzyib?= =?utf-8?q?l0YcfE+32TiWx5DAtctC597UyUOPV2289tRp6rDHOuOEm/05rh7nr5tHl9L49kDTL?= =?utf-8?q?iySthEWK48UrDaW0qAgr48N/ido2RFiAYp4NdoluqTuaYdjrNjuorQMwBIXTu3+sa?= =?utf-8?q?dOxCJ6WZPoChLV6jYsKMJnw8FQ//+Wise7Rk/2C/8toRXu6n2PBctI0OdPbhHK8f2?= =?utf-8?q?2gNTdfMkEIjeAq9b55rvk7hziV6Cewtauz9AV3K2Io+CBHZZGWhizKE=3D?= Content-ID: MIME-Version: 1.0 X-OriginatorOrg: espressif.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TYZPR04MB5736.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ec86e358-b7eb-4c90-e5a1-08dc5245949f X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Apr 2024 12:16:37.9292 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5faf27fd-3557-4294-9545-8ea74a409f39 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: dIccvposwupVCFzL2vonQNDv6HdSnxFXC0eOWBREqaYp1vT53Ps4FfKDY8pQnOhCS8+XtQIMT3ZUhoebnB1gIAQDY+YEogFRS0uyCtzAICg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0401MB6307 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org gcc/ * config/xtensa/elf.h (ASM_SPEC, LINK_SPEC): Pass dynconfig to assembler/linker. * config/xtensa/linux.h (ASM_SPEC, LINK_SPEC): Likewise. * config/xtensa/uclinux.h (ASM_SPEC, LINK_SPEC): Likewise. * config/xtensa/xtensa-dynconfig.cc: May build dynconfig path with dir in XTENSA_GNU_CONFIG and filename in mdynconfig option. * doc/invoke.texi: Add XTENSA_GNU_CONFIG and mdynconfig doc. --- gcc/config/xtensa/elf.h | 6 ++- gcc/config/xtensa/linux.h | 6 ++- gcc/config/xtensa/uclinux.h | 6 ++- gcc/config/xtensa/xtensa-dynconfig.cc | 55 ++++++++++++++++++++++++++- gcc/config/xtensa/xtensa.opt | 4 ++ gcc/doc/invoke.texi | 14 +++++++ 6 files changed, 83 insertions(+), 8 deletions(-) -- 2.34.1 diff --git a/gcc/config/xtensa/elf.h b/gcc/config/xtensa/elf.h index aa14f9d0134..dd20cb310d0 100644 --- a/gcc/config/xtensa/elf.h +++ b/gcc/config/xtensa/elf.h @@ -49,7 +49,8 @@ along with GCC; see the file COPYING3. If not see %{mauto-litpools:--auto-litpools} \ %{mno-auto-litpools:--no-auto-litpools} \ %{mabi=windowed:--abi-windowed} \ - %{mabi=call0:--abi-call0}" + %{mabi=call0:--abi-call0} \ + %{mdynconfig=*:--dynconfig=%*}" #undef LIB_SPEC #define LIB_SPEC "-lc -lsim -lc -lhandlers-sim -lhal" @@ -69,7 +70,8 @@ along with GCC; see the file COPYING3. If not see %{rdynamic:-export-dynamic} \ %{static:-static}}} \ %{mabi=windowed:--abi-windowed} \ - %{mabi=call0:--abi-call0}" + %{mabi=call0:--abi-call0} \ + %{mdynconfig=*:--dynconfig=%*}" #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h index 03ec8e7254a..5a19af13dd3 100644 --- a/gcc/config/xtensa/linux.h +++ b/gcc/config/xtensa/linux.h @@ -46,7 +46,8 @@ along with GCC; see the file COPYING3. If not see %{mauto-litpools:--auto-litpools} \ %{mno-auto-litpools:--no-auto-litpools} \ %{mabi=windowed:--abi-windowed} \ - %{mabi=call0:--abi-call0}" + %{mabi=call0:--abi-call0} \ + %{mdynconfig=*:--dynconfig=%*}" #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" @@ -60,7 +61,8 @@ along with GCC; see the file COPYING3. If not see %{static-pie:-static -pie --no-dynamic-linker -z text} \ %{static:-static}} \ %{mabi=windowed:--abi-windowed} \ - %{mabi=call0:--abi-call0}" + %{mabi=call0:--abi-call0} \ + %{mdynconfig=*:--dynconfig=%*}" #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." diff --git a/gcc/config/xtensa/uclinux.h b/gcc/config/xtensa/uclinux.h index 062e9640d64..7dd868e074a 100644 --- a/gcc/config/xtensa/uclinux.h +++ b/gcc/config/xtensa/uclinux.h @@ -53,13 +53,15 @@ along with GCC; see the file COPYING3. If not see %{mauto-litpools:--auto-litpools} \ %{mno-auto-litpools:--no-auto-litpools} \ %{mabi=windowed:--abi-windowed} \ - %{mabi=call0:--abi-call0}" + %{mabi=call0:--abi-call0} \ + %{mdynconfig=*:--dynconfig=%*}" #undef LINK_SPEC #define LINK_SPEC \ "%{!no-elf2flt:%{!elf2flt*:-elf2flt}} \ %{mabi=windowed:--abi-windowed} \ - %{mabi=call0:--abi-call0}" + %{mabi=call0:--abi-call0} \ + %{mdynconfig=*:--dynconfig=%*}" #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." diff --git a/gcc/config/xtensa/xtensa-dynconfig.cc b/gcc/config/xtensa/xtensa-dynconfig.cc index 3bd2760e4d8..fe2559e1ed7 100644 --- a/gcc/config/xtensa/xtensa-dynconfig.cc +++ b/gcc/config/xtensa/xtensa-dynconfig.cc @@ -22,6 +22,7 @@ #include "coretypes.h" #include "diagnostic.h" #include "intl.h" +#include "options.h" #define XTENSA_CONFIG_DEFINITION #include "xtensa-config.h" #include "xtensa-dynconfig.h" @@ -67,6 +68,55 @@ dlerror (void) #define CONFIG_ENV_NAME "XTENSA_GNU_CONFIG" +#ifdef ENABLE_PLUGIN + +static char *get_xtensa_dynconfig_file (void) +{ + const char *xtensa_dynconfig_env = getenv (CONFIG_ENV_NAME); + if (!strlen (xtensa_dynconfig_file)) + { + if (xtensa_dynconfig_env && !strlen (lbasename (xtensa_dynconfig_env))) + { + /* XTENSA_GNU_CONFIG has directory path, but dynconfig file is not set */ + return NULL; + } + else if (xtensa_dynconfig_env) + { + /* XTENSA_GNU_CONFIG has filepath */ + return xstrdup (xtensa_dynconfig_env); + } + /* dynconfig is not set */ + return NULL; + } + if (!xtensa_dynconfig_env) + { + /* XTENSA_GNU_CONFIG has filepath */ + return xstrdup (xtensa_dynconfig_file); + } + if (!strlen (lbasename (xtensa_dynconfig_env))) + { + /* XTENSA_GNU_CONFIG has directory path and dynconfig file is set */ + const size_t len = strlen (xtensa_dynconfig_env) + + strlen (xtensa_dynconfig_file) + 1; + char *path = ( char *) xmalloc (len); + strcpy (path, xtensa_dynconfig_env); + strcat (path, xtensa_dynconfig_file); + return path; + } + if (strcmp (lbasename (xtensa_dynconfig_env), + lbasename (xtensa_dynconfig_file))) + { + fatal_error (input_location, + "Both %qs and \"-dynconfig=\" specified but pointed different files: \"%qs\" \"%qs\"", + CONFIG_ENV_NAME, xtensa_dynconfig_env, xtensa_dynconfig_file); + exit (FATAL_EXIT_CODE); + } + /* XTENSA_GNU_CONFIG and mdynconfig option point to the same file */ + return xstrdup (xtensa_dynconfig_env); +} + +#endif /* ENABLE_PLUGIN */ + const void *xtensa_load_config (const char *name ATTRIBUTE_UNUSED, const void *no_plugin_def, const void *no_name_def ATTRIBUTE_UNUSED) @@ -78,12 +128,13 @@ const void *xtensa_load_config (const char *name ATTRIBUTE_UNUSED, if (!init) { - const char *path = getenv (CONFIG_ENV_NAME); + char *path = get_xtensa_dynconfig_file(); init = 1; if (!path) return no_plugin_def; handle = dlopen (path, RTLD_LAZY); + free (path); if (!handle) { fatal_error (input_location, @@ -119,7 +170,7 @@ const void *xtensa_load_config (const char *name ATTRIBUTE_UNUSED, #else if (!init) { - const char *path = getenv (CONFIG_ENV_NAME); + const char *path = strcmp(xtensa_dynconfig_file, "") ? xtensa_dynconfig_file : getenv (CONFIG_ENV_NAME); init = 1; if (path) diff --git a/gcc/config/xtensa/xtensa.opt b/gcc/config/xtensa/xtensa.opt index b653e99d189..0f073791cc3 100644 --- a/gcc/config/xtensa/xtensa.opt +++ b/gcc/config/xtensa/xtensa.opt @@ -71,3 +71,7 @@ Use windowed registers ABI. mstrict-align Target Var(xtensa_strict_alignment) Init(XTENSA_STRICT_ALIGNMENT_UNDEFINED) Do not use unaligned memory references. + +mdynconfig= +Target RejectNegative Joined Var(xtensa_dynconfig_file) Init("") +Directory or path to dynconfig library. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 942103c23f5..153db7853de 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -36329,6 +36329,14 @@ Choose startup files and linker script suitable for the simulator. These options are supported for Xtensa targets: @table @gcctabopt + +@vindex XTENSA_GNU_CONFIG +@item XTENSA_GNU_CONFIG +@env{XTENSA_GNU_CONFIG} is designed to set dir/fullpath to dynconfig +library. In case directory is present in @env{XTENSA_GNU_CONFIG} +filename of dynconfig library must be set in @option{-mdynconfig}. +Must ends with directory separator in case contains direcrory path. + @opindex mconst16 @opindex mno-const16 @item -mconst16 @@ -36476,6 +36484,12 @@ The default is @option{-mno-strict-align} for cores that support both unaligned loads and stores in hardware and @option{-mstrict-align} for all other cores. +@opindex mdynconfig +@item -mdynconfig=@var{path} +Set the filename/path to xtensa dynconfig. +In case filename is set the directory part must be present in +@env{XTENSA_GNU_CONFIG} environment variable. + @end table @node zSeries Options