Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 0C9CE22052B for <~alpine/devel@lists.alpinelinux.org>; Thu, 27 Nov 2025 11:46:28 +0000 (UTC) Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 69DF5240027 for <~alpine/devel@lists.alpinelinux.org>; Thu, 27 Nov 2025 12:46:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017; t=1764243987; bh=etOYS+mo5dZYhEuxGqUHOyLp4FBssjNEWMV7ukK5BbI=; h=Mime-Version:Content-Transfer-Encoding:Content-Type:Date: Message-Id:Subject:From:To:From; b=X2Ddi/5IJ+lDP12ALjhUBqTT6DIAP/ARlMt+HVI+Zqj3V+dF44WxJ2ICu61eYR9xm arEahDvRldZxwkp/Z18AHFT4qMEGClq/DQEnqnpdZmf3uhINbPP6IVK7RPrlLcMGKN llKIIhUEXjgg5DCq6jFbyNFbhfj1C0e23qRWtFbrqnKMTb7kDiniJN0fwmaCmL+Omz 113XS6oZTj6hBr3vnP4Vt/2tzgis4e87vN4v8b2/Fm25+/frkdv7edNRuEclAx8h5j t5+7Ys5RjzjK0lYkd0+BF7tZt1HYQpHszN2bKtIjCuBZk63vxqg6JQ6iJt70euY8zg Cc1WsgeKknc8w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4dHF4y4wmPz9rxF; Thu, 27 Nov 2025 12:46:26 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 27 Nov 2025 11:46:27 +0000 Message-Id: Subject: =?utf-8?q?Re:_is_it_possible_to_compile_Alpine_for_486=EF=BC=9F?= From: "Sertonix" To: =?utf-8?q?=E5=B0=A4=E6=99=93=E6=9D=B0?= , <~alpine/devel@lists.alpinelinux.org> References: <79f84b0c.6915.19ac43bb080.Coremail.yxj790222@163.com> In-Reply-To: <79f84b0c.6915.19ac43bb080.Coremail.yxj790222@163.com> On Thu Nov 27, 2025 at 8:33 AM CET, =E5=B0=A4=E6=99=93=E6=9D=B0 wrote: > How can I modify -march parameter gracefully when I abuild command? Using= abuild the default is -march=3Di586 -mtune=3Dgeneric, is there a place to = modify this parameter gracefully? and I have my best minimum kernel configu= re (best-mini.conf), how can I use my .conf file gracefully in abuild scrip= t? > > 6 586/K5/5x86/6x86/6x86MX (-mtune=3Dgeneric ; SIMD assembly modules ena= bled based on simple compile test and/or presence of CPU flag) 1000 HZ Vo= luntary Kernel Preemption (Desktop) 32=20 > > does I need to compile i486-alpine-gcc crossing compile tools first? I have never tried adding flags like -march without compiling a cross compiler. There may be ways to make it work but I would not recommend it. I would recommend to adapt _arch_configure in main/gcc/APKBUILD for your target and then compile the cross compiler (with something like scripts/bootstrap.sh ). You will likely encounter issues due to abuild missing (usable) arch/triplet mappings for i486. The simplest (but a bit hacky) was is to patch /usr/share/abuild/functions.sh. Ether by changing the "x86" arch to be considered as i486 instead of i586: --- a/functions.sh.in +++ b/functions.sh.in @@ -30 +30 @@ arch_to_triplet() { - x86) echo "i586-alpine-linux-musl" ;; + x86) echo "i486-alpine-linux-musl" ;; Or by adding "i486" as new arch which may require changing more aports to handle "i486" similar to "x86". --- a/functions.sh.in +++ b/functions.sh.in @@ -29,2 +29,3 @@ arch_to_triplet() { sh4) echo "sh4-alpine-linux-musl" ;; + i486) echo "i486-alpine-linux-musl" ;; x86) echo "i586-alpine-linux-musl" ;; @@ -47,2 +48,3 @@ triplet_to_arch() { armv7*-*-*-*eabihf) echo "armv7" ;; + i486-*-*-*) echo "i486" ;; i[0-9]86-*-*-*) echo "x86" ;;