From patchwork Wed Jan 3 02:11:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Shoudi Li (Stephen)" X-Patchwork-Id: 1881832 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=xsfY2Gfz; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=h1fqD+Gr; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4YDp0GdSz20Rq for ; Wed, 3 Jan 2024 13:14:01 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Vb7SQnoxUwDnqvHHP8c7GnR/IXUhnrjW35vururnX00=; b=xsfY2GfzTeEvsX /xovhmw5uI9hzpCTISQ0Jp8e9YaCa/nT/k1Bj8U2kWTvASRMfJJCrWuJ33Jm56vue0IgJRLW14hDl jscqoHgs/yA9vXTmpRDFVnLioTcf6hDm8lrKICWprhZKY7j0wMGhcupXOdENVLAIaq2CaHuknJ835 dYujVU0ZJuVOIHNbHSc6lH66MI9VY6pxcuF4KE37uUOqW7Q61BmJYteQ7auN609nBqfknWUUhWql3 cGgtfFCBKycWZN43yDXaAgOP5HJNW7JmfUJo323IOFkXvx4PLBfOA5cYTEAIWlGMd9JBO+VMdhpmN LqoUfWinKenj7cLIunkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rKqjn-009Xy3-35; Wed, 03 Jan 2024 02:12:07 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rKqjk-009Xxc-2R for openwrt-devel@lists.openwrt.org; Wed, 03 Jan 2024 02:12:06 +0000 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40321ArX013757 for ; Wed, 3 Jan 2024 02:11:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=qcppdkim1; bh=ehHwTmoOFoTFf5NzlMbA 0SXtIZEPHKO2fHL31cmhhLk=; b=h1fqD+Gr2BxUaMmxzVJV457+ujnQnYezO1T1 JhAjBYpiI1lARIerMXFHHV9vtrrhRD77xbAcp9yx6GGieX0ozIOGf5ES09RtDzyi HUP3v1fIeJ81V6XcJ/9VRTvAC3Uis5bgln/cW+Ibuzmt3Vlca4ioOWjsKw+DVFnP McPdHmdmAaOAAAyTIkKeS6sP2s9sOkbV18K5a1z+1Ggkgsha0ZqEKo2bKx5hxdwy xnLsMzxAWnRtC1EO6HYS890ba4oVg6CnlayUhH7KKvwd0YOomiUS6ZZ2PwtEsJZS nlBQpRB2ghP91dgnKqRmtpRYD2Qsd/WI2aoEJTVoQJ6+fj/uXw== Received: from aptaippmta02.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com [103.229.16.4]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vbsyk3c8p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 03 Jan 2024 02:11:58 +0000 (GMT) Received: from pps.filterd (APTAIPPMTA02.qualcomm.com [127.0.0.1]) by APTAIPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 4032Buaq017151 for ; Wed, 3 Jan 2024 02:11:56 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APTAIPPMTA02.qualcomm.com (PPS) with ESMTPS id 3vac9kgp7x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 03 Jan 2024 02:11:56 +0000 Received: from APTAIPPMTA02.qualcomm.com (APTAIPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 4032ButJ017146 for ; Wed, 3 Jan 2024 02:11:56 GMT Received: from shoudil2-gv.ap.qualcomm.com (shoudil2-gv.qualcomm.com [10.233.41.195]) by APTAIPPMTA02.qualcomm.com (PPS) with ESMTPS id 4032Btr9017145 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Jan 2024 02:11:56 +0000 Received: by shoudil2-gv.ap.qualcomm.com (Postfix, from userid 367460) id 072CE2216B; Wed, 3 Jan 2024 10:11:54 +0800 (CST) From: quic_shoudil@quicinc.com To: openwrt-devel@lists.openwrt.org Cc: shoudil Subject: [PATCH] build: enable thumb compile flag for 32bit architecture. Date: Wed, 3 Jan 2024 10:11:44 +0800 Message-Id: <20240103021144.240369-1-quic_shoudil@quicinc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: T-yYAW_sziH3FC7Mbp3p3z720R2mie6- X-Proofpoint-GUID: T-yYAW_sziH3FC7Mbp3p3z720R2mie6- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=2 adultscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 bulkscore=0 mlxlogscore=169 spamscore=2 suspectscore=0 clxscore=1011 mlxscore=2 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401030015 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240102_181204_918255_9F85CD75 X-CRM114-Status: UNSURE ( 8.50 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: shoudil Enable thumb flag to reduce package size, which help optimize the size of system image as well. Signed-off-by: shoudil --- include/hardening.mk | 4 ++++ 1 file changed, 4 insertions(+) Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: shoudil Enable thumb flag to reduce package size, which help optimize the size of system image as well. Signed-off-by: shoudil --- include/hardening.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/hardening.mk b/include/hardening.mk index 6acd862f5c..8c59643866 100644 --- a/include/hardening.mk +++ b/include/hardening.mk @@ -9,6 +9,10 @@ PKG_SSP ?= 1 PKG_FORTIFY_SOURCE ?= 1 PKG_RELRO ?= 1 +ifeq ($(ARCH),arm) + TARGET_CFLAGS += -mthumb +endif + ifdef CONFIG_PKG_CHECK_FORMAT_SECURITY ifeq ($(strip $(PKG_CHECK_FORMAT_SECURITY)),1) TARGET_CFLAGS += -Wformat -Werror=format-security