1 .\" dpkg manual page - dpkg-architecture(1)
3 .\" Copyright © 2005 Marcus Brinkmann <brinkmd@debian.org>
4 .\" Copyright © 2005 Scott James Remnant <scott@netsplit.com>
5 .\" Copyright © 2006-2015 Guillem Jover <guillem@debian.org>
6 .\" Copyright © 2009-2012 Raphaël Hertzog <hertzog@debian.org>
8 .\" This is free software; you can redistribute it and/or modify
9 .\" it under the terms of the GNU General Public License as published by
10 .\" the Free Software Foundation; either version 2 of the License, or
11 .\" (at your option) any later version.
13 .\" This is distributed in the hope that it will be useful,
14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 .\" GNU General Public License for more details.
18 .\" You should have received a copy of the GNU General Public License
19 .\" along with this program. If not, see <https://www.gnu.org/licenses/>.
21 .\"*******************************************************************
23 .\" This file was generated with po4a. Translate the source file.
25 .\"*******************************************************************
26 .TH dpkg\-architecture 1 %RELEASE_DATE% %VERSION% "suite dpkg"
29 dpkg\-architecture \- imposta e determina l'architettura per la compilazione
33 \fBdpkg\-architecture\fP [\fIopzione\fP...] [\fIcomando\fP]
37 \fBdpkg\-architecture\fP fornisce una funzionalità per determinare e impostare
38 l'architettura host e di compilazione per la compilazione dei pacchetti.
40 L'architettura di compilazione è sempre determinata da una chiamata esterna
41 a \fBdpkg\fP(1) e non può essere impostata dalla riga di comando.
43 È possibile specificare l'architettura ospite fornendo una o entrambe le
44 opzioni \fB\-\-host\-arch\fP e \fB\-\-host\-type\fP. Quella predefinita viene
45 determinata da una chiamata esterna a \fBgcc\fP(1) oppure, se entrambi \fBCC\fP e
46 gcc non sono disponibili, è la stessa dell'architettura di compilazione. È
47 sufficiente una di \fB\-\-host\-arch\fP e \fB\-\-host\-type\fP, il valore dell'altra
48 viene impostato da un valore predefinito utilizzabile. In effetti è spesso
49 meglio specificarne una sola, dato che \fBdpkg\-architecture\fP dà un
50 avvertimento se la scelta non corrisponde al valore predefinito.
54 \fB\-l\fP, \fB\-\-list\fP
55 Stampa le variabili d'ambiente, una per riga, nel formato
56 \fIVARIABILE=valore\fP. Questa è l'azione predefinita.
58 \fB\-e\fP, \fB\-\-equal\fP \fIarchitettura\fP
59 Controlla l'uguaglianza dell'architettura (a partire da dpkg
60 1.13.13). Confronta l'architettura Debian ospite attuale o specificata con
61 \fIarchitettura\fP, per verificare se sono uguali. Questa azione non espande
62 l'espressione jolly per l'architettura. Il comando termina con uno stato di
63 uscita di 0 se corrispondono e 1 altrimenti.
66 \fB\-i\fP, \fB\-\-is\fP \fIespressionejolly\-architettura\fP
67 Controlla l'identità dell'architettura (a partire da dpkg
68 1.13.13). Confronta l'architettura Debian ospite attuale o specificata con
69 \fIespressionejolly\-architettura\fP dopo aver fatto l'espansione
70 dell'espressione jolly per l'architettura, per verificare se
71 corrispondono. Il comando termina con uno stato di uscita di 0 se
72 corrispondono e 1 altrimenti.
74 \fB\-q\fP, \fB\-\-query\fP \fInome\-variabile\fP
75 Stampa il valore di una singola variabile.
77 \fB\-s\fP, \fB\-\-print\-set\fP
78 Stampa un comando di esportazione. Può essere usata per impostare le
79 variabili d'ambiente usando eval.
81 \fB\-u\fP, \fB\-\-print\-unset\fP
82 Stampa un comando simile a \fB\-\-print\-unset\fP ma per deimpostare tutte le
85 \fB\-c\fP, \fB\-\-command\fP \fIcomando\fP
86 Esegue un \fIcomando\fP in un ambiente che ha tutte le variabili impostate al
89 \fB\-L\fP, \fB\-\-list\-known\fP
90 Stampa un elenco di nomi di architettura validi. Eventualmente ristretto da
91 una o più delle opzioni di corrispondenza \fB\-\-match\-wildcard\fP,
92 \fB\-\-match\-bits\fP o \fB\-\-match\-endian\fP (a partire da dpkg 1.17.14).
94 \fB\-?\fP, \fB\-\-help\fP
95 Mostra il messaggio sull'uso ed esce.
98 Mostra la versione ed esce.
102 \fB\-a\fP, \fB\-\-host\-arch\fP \fIarchitettura\fP
103 Imposta l'architettura host Debian.
105 \fB\-t\fP, \fB\-\-host\-type\fP \fItipo\-sistema\-gnu\fP
106 Imposta il tipo di sistema GNU ospite.
108 \fB\-A\fP, \fB\-\-target\-arch\fP \fIarchitettura\fP
109 Set the target Debian architecture (since dpkg 1.17.14).
111 \fB\-T\fP, \fB\-\-target\-type\fP \fItipo\-sistema\-gnu\fP
112 Set the target GNU system type (since dpkg 1.17.14).
114 \fB\-W\fP, \fB\-\-match\-wildcard\fP \fIespressionejolly\-architettura\fP
115 Limita le architetture elencate da \fB\-\-list\-known\fP a quelle che
116 corrispondono alla espressione jolly specificata per l'architettura (a
117 partire da dpkg 1.17.14).
119 \fB\-B\fP, \fB\-\-match\-bits\fP \fIbit\-architettura\fP
120 Limita le architetture elencate da \fB\-\-list\-known\fP a quelle con i bit CPU
121 specificati (a partire da dpkg 1.17.14). O \fB32\fP o \fB64\fP.
123 \fB\-E\fP, \fB\-\-match\-endian\fP \fIendian\-architettura\fP
124 Limita le architetture elencate da \fB\-\-list\-known\fP a quelle con la modalità
125 endian specificata (a partire da dpkg 1.17.14). O \fBlittle\fP o \fBbig\fP.
127 \fB\-f\fP, \fB\-\-force\fP
128 I valori impostati da variabili d'ambiente esistenti con nomi uguali a
129 quelli usati dagli script vengono rispettati (cioè usati da
130 \fBdpkg\-architecture\fP), tranne se viene usata questa opzione. Ciò permette
131 all'utente di sovrascrivere un valore anche quando la chiamata a
132 \fBdpkg\-architecture\fP è nascosta in qualche altro script (per esempio
133 \fBdpkg\-buildpackage\fP(1)).
136 .IP "macchina di compilazione" 4
137 La macchina usata per creare il pacchetto.
138 .IP "macchina ospite" 4
139 La macchina per cui è compilato il pacchetto.
140 .IP "macchina di destinazione" 4
141 The machine the compiler is building for. This is only needed when building
142 a cross\-toolchain, one that will be built on the build architecture, to be
143 run on the host architecture, and to build code for the target architecture.
144 .IP "architettura Debian" 4
145 La stringa dell'architettura Debian che specifica l'albero binario
146 nell'archivio FTP. Esempi: i386, sparc, hurd\-i386.
147 .IP "Debian architecture tuple" 4
148 A Debian architecture tuple is the fully qualified architecture with all its
149 components spelled out. This differs with Debian architectures in that at
150 least the \fIcpu\fP component does not embed the \fIabi\fP. The current tuple has
151 the form \fIabi\fP\-\fIlibc\fP\-\fIos\fP\-\fIcpu\fP. Examples: base\-gnu\-linux\-amd64,
152 eabihf\-musl\-linux\-arm.
153 .IP "Debian architecture wildcard" 4
154 A Debian architecture wildcard is a special architecture string that will
155 match any real architecture being part of it. The general form is a Debian
156 architecture tuple with four or less elements, and with at least one of them
157 being \fBany\fP. Missing elements of the tuple are prefixed implicitly as
158 \fBany\fP, and thus the following pairs are equivalent:
160 \fBany\fP\-\fBany\fP\-\fBany\fP\-\fBany\fP = \fBany\fP
161 \fBany\fP\-\fBany\fP\-\fIos\fP\-\fBany\fP = \fIos\fP\-\fBany\fP
162 \fBany\fP\-\fIlibc\fP\-\fBany\fP\-\fBany\fP = \fIlibc\fP\-\fBany\fP\-\fBany\fP
164 Examples: linux\-any, any\-i386, hurd\-any, eabi\-any\-any\-arm, musl\-any\-any.
165 .IP "tipo di sistema GNU" 4
166 An architecture specification string consisting of two parts separated by a
167 hyphen: cpu and system. Examples: i586\-linux\-gnu, sparc\-linux\-gnu,
168 i686\-gnu, x86_64\-netbsd.
169 .IP "multiarch triplet" 4
170 The clarified GNU system type, used for filesystem paths. This triplet does
171 not change even when the baseline ISA gets bumped, so that the resulting
172 paths are stable over time. The only current difference with the GNU system
173 type is that the CPU part for i386 based systems is always i386. Examples:
174 i386\-linux\-gnu, x86_64\-linux\-gnu. Example paths:
175 /lib/powerpc64le\-linux\-gnu/, /usr/lib/i386\-kfreebsd\-gnu/.
178 \fBdpkg\-architecture\fP imposta le seguenti variabili:
179 .IP \fBDEB_BUILD_ARCH\fP 4
180 L'architettura Debian della macchina di compilazione.
181 .IP \fBDEB_BUILD_ARCH_ABI\fP 4
182 The Debian abi name of the build machine (since dpkg 1.18.11).
183 .IP \fBDEB_BUILD_ARCH_LIBC\fP 4
184 The Debian libc name of the build machine (since dpkg 1.18.11).
185 .IP \fBDEB_BUILD_ARCH_OS\fP 4
186 Il nome di sistema Debian della macchina di compilazione (a partire da dpkg
188 .IP \fBDEB_BUILD_ARCH_CPU\fP 4
189 Il nome Debian per la CPU della macchina di compilazione (a partire da dpkg
191 .IP \fBDEB_BUILD_ARCH_BITS\fP 4
192 La dimensione del puntatore della macchina di compilazione (in bit; a
193 partire da dpkg 1.15.4).
194 .IP \fBDEB_BUILD_ARCH_ENDIAN\fP 4
195 La modalità endian della macchina di compilazione (little o big; a partire
197 .IP \fBDEB_BUILD_GNU_CPU\fP 4
198 La parte CPU di \fBDEB_BUILD_GNU_TYPE\fP.
199 .IP \fBDEB_BUILD_GNU_SYSTEM\fP 4
200 La parte sistema di \fBDEB_BUILD_GNU_TYPE\fP.
201 .IP \fBDEB_BUILD_GNU_TYPE\fP 4
202 Il tipo di sistema GNU della macchina di compilazione.
203 .IP \fBDEB_BUILD_MULTIARCH\fP 4
204 Il tipo di sistema GNU chiarito della macchina di compilazione usato per i
205 percorsi del file system (a partire da dpkg 1.16.0).
206 .IP \fBDEB_HOST_ARCH\fP 4
207 L'architettura Debian della macchina ospite.
208 .IP \fBDEB_HOST_ARCH_ABI\fP 4
209 The Debian abi name of the host machine (since dpkg 1.18.11).
210 .IP \fBDEB_HOST_ARCH_LIBC\fP 4
211 The Debian libc name of the host machine (since dpkg 1.18.11).
212 .IP \fBDEB_HOST_ARCH_OS\fP 4
213 Il nome di sistema Debian della macchina ospite (a partire da dpkg 1.13.2).
214 .IP \fBDEB_HOST_ARCH_CPU\fP 4
215 Il nome Debian per la CPU della macchina host (a partire da dpkg 1.13.2).
216 .IP \fBDEB_HOST_ARCH_BITS\fP 4
217 La dimensione del puntatore della macchina ospite (in bit; a partire da dpkg
219 .IP \fBDEB_HOST_ARCH_ENDIAN\fP 4
220 La modalità endian della macchina ospite (little o big; a partire da dpkg
222 .IP \fBDEB_HOST_GNU_CPU\fP 4
223 La parte CPU di \fBDEB_HOST_GNU_TYPE\fP.
224 .IP \fBDEB_HOST_GNU_SYSTEM\fP 4
225 La parte sistema di \fBDEB_HOST_GNU_TYPE\fP.
226 .IP \fBDEB_HOST_GNU_TYPE\fP 4
227 Il tipo di sistema GNU della macchina ospite.
228 .IP \fBDEB_HOST_MULTIARCH\fP 4
229 Il tipo di sistema GNU chiarito della macchina ospite usato per i percorsi
230 del file system (a partire da dpkg 1.16.0).
231 .IP \fBDEB_TARGET_ARCH\fP 4
232 L'architettura Debian della macchina di destinazione (a partire da dpkg
234 .IP \fBDEB_TARGET_ARCH_ABI\fP 4
235 The Debian abi name of the target machine (since dpkg 1.18.11).
236 .IP \fBDEB_TARGET_ARCH_LIBC\fP 4
237 The Debian libc name of the target machine (since dpkg 1.18.11).
238 .IP \fBDEB_TARGET_ARCH_OS\fP 4
239 Il nome di sistema Debian della macchina di destinazione (a partire da dpkg
241 .IP \fBDEB_TARGET_ARCH_CPU\fP 4
242 Il nome Debian per la CPU della macchina di destinazione (a partire da dpkg
244 .IP \fBDEB_TARGET_ARCH_BITS\fP 4
245 La dimensione del puntatore della macchina di destinazione (in bit; a
246 partire da dpkg 1.17.14).
247 .IP \fBDEB_TARGET_ARCH_ENDIAN\fP 4
248 La modalità endian della macchina di destinazione (little o big; a partire
250 .IP \fBDEB_TARGET_GNU_CPU\fP 4
251 La parte CPU di \fBDEB_TARGET_GNU_TYPE\fP (a partie da dpkg 1.17.14).
252 .IP \fBDEB_TARGET_GNU_SYSTEM\fP 4
253 La parte sistema di \fBDEB_TARGET_GNU_TYPE\fP (a partire da dpkg 1.17.14).
254 .IP \fBDEB_TARGET_GNU_TYPE\fP 4
255 Il tipo di sistema GNU della macchina di destinazione (a partire da dpkg
257 .IP \fBDEB_TARGET_MULTIARCH\fP 4
258 Il tipo di sistema GNU chiarito della macchina di destinazione usato per i
259 percorsi del file system (a partire da dpkg 1.17.14).
262 .SS "Tabelle delle architetture"
263 All these files have to be present for \fBdpkg\-architecture\fP to work. Their
264 location can be overridden at runtime with the environment variable
265 \fBDPKG_DATADIR\fP. These tables contain a format \fBVersion\fP pseudo\-field on
266 their first line to mark their format, so that parsers can check if they
267 understand it, such as "# Version=1.0".
269 \fI%PKGDATADIR%/cputable\fP
270 Table of known CPU names and mapping to their GNU name. Format version 1.0
273 \fI%PKGDATADIR%/ostable\fP
274 Table of known operating system names and mapping to their GNU name. Format
275 version 2.0 (since dpkg 1.18.11).
277 \fI%PKGDATADIR%/tupletable\fP
278 Mapping between Debian architecture tuples and Debian architecture names.
279 Format version 1.0 (since dpkg 1.18.11).
281 \fI%PKGDATADIR%/abitable\fP
282 Table of Debian architecture ABI attribute overrides. Format version 2.0
283 (since dpkg 1.18.11).
284 .SS "Supporto per pacchettizzazione"
286 \fI%PKGDATADIR%/architecture.mk\fP
287 Frammento di makefile che imposta ed esporta in modo corretto tutte le
288 variabili prodotte in output da \fBdpkg\-architecture\fP (a partire da dpkg
292 \fBdpkg\-buildpackage\fP accetta l'opzione \fB\-a\fP e la passa a
293 \fBdpkg\-architecture\fP. Altri esempi:
295 CC=i386\-gnu\-gcc dpkg\-architecture \-c debian/rules build
297 eval \`dpkg\-architecture \-u\`
299 Controlla se l'architettura ospite corrente o specificata è uguale ad
302 dpkg\-architecture \-elinux\-alpha
304 dpkg\-architecture \-amips \-elinux\-mips
306 Controlla se l'architettura ospite corrente o specificata è un sistema
309 dpkg\-architecture \-ilinux\-any
311 dpkg\-architecture \-ai386 \-ilinux\-any
313 .SS "Uso in debian/rules"
314 Le variabili d'ambiente impostate da \fBdpkg\-architecture\fP vengono passate a
315 \fIdebian/rules\fP come variabili make (vedere la documentazione di
316 make). Tuttavia non si deve fare affidamento su di esse, dato che ciò rende
317 non funzionanti le invocazioni manuali dello script. Le si dovrebbe invece
318 inizializzare sempre usando \fBdpkg\-architecture\fP con l'opzione \fB\-q\fP. Ecco
319 alcuni esempi, che mostrano anche come migliorare il supporto per la
320 cross\-compilazione nei propri pacchetti:
322 Recuperare il tipo di sistema GNU e passarlo a ./configure:
326 DEB_BUILD_GNU_TYPE ?= $(shell dpkg\-architecture \-qDEB_BUILD_GNU_TYPE)
327 DEB_HOST_GNU_TYPE ?= $(shell dpkg\-architecture \-qDEB_HOST_GNU_TYPE)
329 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
330 confflags += \-\-build=$(DEB_HOST_GNU_TYPE)
332 confflags += \-\-build=$(DEB_BUILD_GNU_TYPE) \e
333 \-\-host=$(DEB_HOST_GNU_TYPE)
336 \&./configure $(confflags)
340 Fare qualcosa solo per un'architettura specifica:
344 DEB_HOST_ARCH ?= $(shell dpkg\-architecture \-qDEB_HOST_ARCH)
346 ifeq ($(DEB_HOST_ARCH),alpha)
352 oppure se è necessario solo controllare il tipo di CPU o sistema operativo,
353 usare le variabili \fBDEB_HOST_ARCH_CPU\fP o \fBDEB_HOST_ARCH_OS\fP.
355 Notare che ci si può anche appoggiare su un frammento di Makefile esterno
356 per impostare correttamente tutte le variabili che possono essere fornite da
357 \fBdpkg\-architecture\fP.
361 include %PKGDATADIR%/architecture.mk
363 ifeq ($(DEB_HOST_ARCH),alpha)
369 In ogni caso non si dovrebbe mai usare \fBdpkg \-\-print\-architecture\fP per
370 ottenere informazioni sull'architettura durante la compilazione di un
376 If set, it will be used as the \fBdpkg\fP data directory, where the
377 architecture tables are located (since dpkg 1.14.17). Defaults to
380 Tutti i nomi lunghi di comandi e opzioni disponibili solo a partire da dpkg
384 \fBdpkg\-buildpackage\fP(1), \fBdpkg\-cross\fP(1).