首页 > 代码库 > rpm宏
rpm宏
/usr/lib/rpm/macros rpm-4.8.0
/usr/lib/rpm/%{_target}/macros rpm-4.8.0
/usr/lib/rpm/redhat/macros redhat-rpm-config-9.0.3
/etc/rpm/macros.* centos-release
[/usr/lib/rpm/macros]
# ---- per-platform macros.
# Macros that are specific to an individual platform. The values here
# will be used if the per-platform macro file does not exist..
%_arch x86_64
%_build_arch x86_64
%_vendor redhat
%_os linux
%_gnu -gnu
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
# ---- config.guess platform macros.
# Macro(s) similar to the tokens used by configure.
%_host x86_64-redhat-linux-gnu
%_host_alias x86_64-redhat-linux-gnu%{nil}
%_host_cpu x86_64
%_host_vendor redhat
%_host_os linux
%_build %{_host}
%_build_alias %{_host_alias}
%_build_cpu %{_host_cpu}
%_build_vendor %{_host_vendor}
%_build_os %{_host_os}
%_target %{_host}
%_target_alias %{_host_alias}
%_target_cpu %{_host_cpu}
%_target_vendor %{_host_vendor}
%_target_os %{_host_os}
[/usr/lib/rpm/platform/x86_64-linux/macros]
%_arch x86_64
%_vendor redhat
%_os linux
%_gnu -gnu
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}
%optflags -O2 -g
%__isa_name x86
%__isa_bits 64
%__isa %{__isa_name}-%{__isa_bits}
[/usr/lib/rpm/platform/noarch-linux/macros]
%_arch noarch
%_vendor redhat
%_os linux
%_gnu -gnu
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}
[/usr/lib/rpm/redhat/macros]
%_vendor redhat
%_os linux
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
【Specifying target triplets】
Autoconf-generated configure scripts can make decisions based on a canonical name for the system type, or target triplet, which has the form: ‘cpu-vendor-os’, where os can be ‘system’ or ‘kernel-system’
configure can guess the canonical name for the type of system it‘s running on. To do so it runs a script called config.guess, which infers the name using the uname command or symbols predefined by the C preprocessor.
Alternately, the user can specify the system type with command line arguments to configure (see System Type. Doing so is necessary when cross-compiling. In the most complex case of cross-compiling, three system types are involved. The options to specify them are:
--build=build-type
the type of system on which the package is being configured and compiled. It defaults to the result of running config.guess.
--host=host-type
the type of system on which the package runs. By default it is the same as the build machine. Specifying it enables the cross-compilation mode.
--target=target-type
the type of system for which any compiler tools in the package produce code (rarely needed). By default, it is the same as host.
rpm宏