This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH [1/n] X32: Add initial -x32 support


Did you even _think_ of looking at the sh configury, and do something
vaguely similar for x86?

You should not duplicate t-linux64 at all.  Instead, in config.gcc set
m64/m32 as the default value for with_multilib_list on i386 biarch and
x86_64.  Pass $with_multilib_list to t-linux64 using
TM_MULTILIB_CONFIG.  Then, do something like

comma=,
MULTILIB_OPTIONS    = $(subst $(comma),/,@TM_MULTILIB_CONFIG@)
MULTILIB_DIRNAMES   = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
MULTILIB_OSDIRNAMES  = 64=../lib64
MULTILIB_OSDIRNAMES += 32=$(if $(wildcard $(shell echo
$(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
MULTILIB_OSDIRNAMES += x32=../libx32

in config/t-linux64.  (Each on one line, apologies for any wrapping)

The option will be used as --with-multilib-list=m64,m32,mx32 (allowing
the user to omit some of the variants, too).

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]