Skip to content

Commit

Permalink
Import version 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
veos-sxarr committed Apr 22, 2019
1 parent 2a524c4 commit 71db6d1
Show file tree
Hide file tree
Showing 289 changed files with 27,152 additions and 295 deletions.
27 changes: 16 additions & 11 deletions Makeconfig
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ inst_auditdir = $(install_root)$(auditdir)
# Where to install default configuration files. These include the local
# timezone specification and network data base files.
ifndef sysconfdir
sysconfdir = $(prefix)/etc
sysconfdir = /etc/$(prefix)
endif
inst_sysconfdir = $(install_root)$(sysconfdir)

Expand All @@ -268,8 +268,9 @@ inst_vardbdir = $(install_root)$(vardbdir)
# relative to $(zonedir). It is a good idea to put this somewhere
# other than there, so the zoneinfo directory contains only universal data,
# localizing the configuration data elsewhere.
# defect refs #1329
ifndef localtime-file
localtime-file = $(sysconfdir)/localtime
localtime-file = /etc/localtime
endif

# What to use for leap second specifications in compiling the default
Expand Down Expand Up @@ -336,11 +337,12 @@ BUILD_CC = $(CC)
endif

# Default flags to pass the C compiler.
# GCC-WORKAROUND: Removed "-g" compiler option as vegcc doesn't support this completely.
ifndef default_cflags
ifeq ($(release),stable)
default_cflags := -g -O2
default_cflags := -O2
else
default_cflags := -g -O
default_cflags := -O
endif
endif

Expand Down Expand Up @@ -548,7 +550,7 @@ ifneq ($(have-cc-with-libunwind),yes)
else
libunwind = -lunwind
endif
libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed
libgcc_eh := -Wl,--as-needed $(libunwind) -Wl,--no-as-needed
gnulib-arch =
gnulib = -lgcc $(gnulib-arch)
gnulib-tests := -lgcc $(libgcc_eh)
Expand All @@ -561,7 +563,7 @@ static-gnulib = -lgcc $(static-gnulib-arch)
else
static-gnulib = -lgcc -lgcc_eh $(static-gnulib-arch)
endif
static-gnulib-tests := -lgcc -lgcc_eh $(libunwind)
static-gnulib-tests := -lgcc $(libunwind)
libc.so-gnulib := -lgcc
endif
+preinit = $(addprefix $(csu-objpfx),crti.o)
Expand Down Expand Up @@ -630,8 +632,8 @@ run-via-rtld-prefix =
endif
# $(run-program-env) is the default environment variable settings to
# use when running a program built with the newly built library.
run-program-env = GCONV_PATH=$(common-objpfx)iconvdata \
LOCPATH=$(common-objpfx)localedata LC_ALL=C
run-program-env = VE_GCONV_PATH=$(common-objpfx)iconvdata \
VE_LOCPATH=$(common-objpfx)localedata LC_ALL=C
# $(run-program-prefix) is a command that, when prepended to the name
# of a program built with the newly built library, produces a command
# that, executed on the build system on which "make" is run, runs that
Expand All @@ -656,7 +658,9 @@ built-program-cmd = $(built-program-cmd-before-env) $(run-program-env) \
# for which the library is built, runs the newly built program that is
# the second dependency of the makefile target in which
# $(host-built-program-cmd) is used.
host-built-program-cmd = $(run-via-rtld-prefix) $(built-program-file)
#host-built-program-cmd = $(run-via-rtld-prefix) $(ve_exec_cmd) $(built-program-file)

host-built-program-cmd = $(built-program-file)

ifndef LD
LD := ld -X
Expand Down Expand Up @@ -718,7 +722,7 @@ else
endif
+gccwarn += -Wundef
ifeq ($(enable-werror),yes)
+gccwarn += -Werror -Wno-error=undef
+gccwarn += -Wno-error=undef
endif
+gccwarn-c = -Wstrict-prototypes

Expand Down Expand Up @@ -891,8 +895,9 @@ pic-ccflag = -fPIC
# This one should always stay like this unless there is a very good reason.
PIC-ccflag = -fPIC
endif
# GCC-WORKAROUND: Removed "-fpie" compiler option as vegcc doesn't support this.
# This can be changed by a sysdep makefile
pie-ccflag = -fpie
pie-ccflag =
# This one should always stay like this unless there is a very good reason.
PIE-ccflag = -fPIE
ifeq (yes,$(build-profile))
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ $(common-objpfx)testrun.sh: $(common-objpfx)config.make \
$(..)Makeconfig $(..)Makefile
(echo '#!/bin/sh'; \
echo 'builddir=`dirname "$$0"`'; \
echo 'GCONV_PATH="$${builddir}/iconvdata" \'; \
echo 'VE_GCONV_PATH="$${builddir}/iconvdata" \'; \
echo 'exec $(subst $(common-objdir),"$${builddir}",\
$(test-program-prefix)) $${1+"$$@"}'; \
) > $@T
Expand Down
84 changes: 84 additions & 0 deletions RPM_README
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
TITLE:
-------
GLIBC rpm package installation.

DETAILS:
--------
Version: glibc base package: 2.21
Branch: develop-vegcc-v2.21

GETTING STARTED:
----------------
These instructions will help you building,installing,testing and removing RPM packages
on your system.

PREREQUISITES:
--------------
1. vegcc compiler installed on your machine.
Please follow below steps to install vegcc
$ git clone -b gcc-7_1_0-ve https://<NEC-ID>@swf1000822.swf.nec.co.jp/git/gcc_meta.git
$ git clone -b gcc-7_1_0-ve https://<NEC-ID>@swf1000822.swf.nec.co.jp/git/gcc_source.git
$ mkdir <gcc build dir>
$ cd <gcc build dir>
$ ../gcc_meta/config.sh -s ../gcc_source $ make $ sudo make install

2. Kernel headers installed on your machine at path /opt/nec/ve/include.
Please follow below steps to install kernel headers:
$ git clone -b RHEL_7.3-ve https://<NEC-ID>@swf1000822.swf.nec.co.jp/git/kernel-headers.git
$ cd kernel-headers
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

3. Copy the libsysve file from musl directory as below:
$ sudo cp /opt/nec/ve/musl/libsysve* /opt/nec/ve/lib/

INSTALLING:
-----------
Installation base path:
/opt/nec/ve
Steps:
1. Clone glibc_source from :
git clone -b develop-vegcc-2.21 https://[email protected]/git/glibc_source.git
2. Rename folder glibc_source with glibc-ve-2.21 as:
mv glibc_source glibc-ve-2.21
3. Create the tar of this folder:
tar -cvf glibc-ve-2.21.tar.gz glibc-ve-2.21
4. Create the "rpmbuild" directory at home as:
mkdir ~/rpmbuild
5. Run rpmbuild command as:
rpmbuild -D "%_topdir /home_directory_path/rpmbuild" -ta <Path of tar file>/glibc-ve-2.21.tar.gz
6. Use below command to install those packages:
sudo rpm -ivh package-name

7. Use below command to remove those packages:
sudo rpm -e package-name --nodeps


PACKAGE DETAILS:
----------------
1. glibc-ve-2.21-1.x86_64.rpm
-----------------------------
It contains below directories:
a. lib
b. libexec
c. share
d. etc
e. bin
f. sbin

2. glibc-ve-devel-2.21-1.x86_64.rpm
-----------------------------------
It contains all header files


TEST PROGRAM BUILD COMMAND:
---------------------------
Dynamic:
/usr/local/ve/bin/vegcc -g pthread.c -Xlinker -rpath=/opt/nec/ve/lib -Xlinker -I/opt/nec/ve/lib/ld-linux-ve.so.1 -I/opt/nec/ve/include/ -I/usr/local/ve/lib/gcc/ve/7.1.0/include -B/opt/nec/ve/lib/ -nostdinc -o test_dyn -lpthread

Static:
/usr/local/ve/bin/vegcc test.c -I/opt/nec/ve/include/ -I/usr/local/ve/lib/gcc/ve/7.1.0/include/ -B/opt/nec/ve/lib/ /usr/local/ve/lib/gcc/ve/7.1.0/libgcc.a -nostdinc -o test_static -static

END
10 changes: 5 additions & 5 deletions catgets/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ ifeq ($(run-built-tests),yes)
$(objpfx)test1.cat: test1.msg $(objpfx)gencat
$(built-program-cmd-before-env) \
$(run-program-env) LC_ALL=hr_HR.ISO-8859-2 \
$(built-program-cmd-after-env) -H $(objpfx)test1.h $@ $<; \
$(objpfx)gencat -H $(objpfx)test1.h $@ $<; \
$(evaluate-test)
$(objpfx)test2.cat: test2.msg $(objpfx)gencat
$(built-program-cmd) -H $(objpfx)test2.h $@ $<; \
$(objpfx)gencat -H $(objpfx)test2.h $@ $<; \
$(evaluate-test)
$(objpfx)de/libc.cat: $(objpfx)de.msg $(objpfx)gencat
$(make-target-directory)
$(built-program-cmd-before-env) \
$(run-program-env) LC_ALL=de_DE.ISO-8859-1 \
$(built-program-cmd-after-env) $@ $<; \
$(objpfx)gencat $@ $<; \
$(evaluate-test)
$(objpfx)tst-catgets.out: $(objpfx)de/libc.cat

Expand All @@ -80,10 +80,10 @@ $(objpfx)de.msg: xopen-msg.awk $(..)po/de.po
$(objpfx)test-gencat.out: test-gencat.sh $(objpfx)test-gencat \
$(objpfx)sample.SJIS.cat
$(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \
'$(run-program-env)' '$(test-program-cmd-after-env)'; \
'$(run-program-env)' '$(built-program-file)';\
$(evaluate-test)

$(objpfx)sample.SJIS.cat: sample.SJIS $(objpfx)gencat
$(built-program-cmd) -H $(objpfx)test-gencat.h < $(word 1,$^) > $@; \
$(objpfx)gencat -H $(objpfx)test-gencat.h < $(word 1,$^) > $@; \
$(evaluate-test)
endif
2 changes: 1 addition & 1 deletion config.h.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#if !defined IS_IN_build && !defined __ASSEMBLER__ && !defined _ISOMAC \
&& !defined __OPTIMIZE__
# error "glibc cannot be compiled without optimization"
//# error "glibc cannot be compiled without optimization"
#endif

/* Another evil option when it comes to compiling the C library is
Expand Down
45 changes: 43 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datarootdir='${prefix}/share'
datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sysconfdir='/etc/${prefix}'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
Expand Down Expand Up @@ -2435,6 +2435,46 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "$host" = ve-unknown-linux-gnu; then
# Extract the first word of "ncc", so it can be a program name with args.
set dummy ncc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy=""$PATH:/opt/nec/ve/bin""
for as_dir in $as_dummy
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="/opt/nec/ve/bin/gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
$as_echo "$CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
Expand Down Expand Up @@ -4437,7 +4477,7 @@ AS=`$CC -print-prog-name=as`
LD=`$CC -print-prog-name=ld`
AR=`$CC -print-prog-name=ar`

OBJDUMP=`$CC -print-prog-name=objdump`
OBJDUMP=`$CC -print-prog-name=/opt/nec/ve/bin/nobjdump`

OBJCOPY=`$CC -print-prog-name=objcopy`

Expand Down Expand Up @@ -6505,6 +6545,7 @@ fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread" >&5
$as_echo_n "checking for __thread... " >&6; }
CFLAGS="-O2"
if ${libc_cv_gcc___thread+:} false; then :
$as_echo_n "(cached) " >&6
else
Expand Down
6 changes: 3 additions & 3 deletions csu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ subdir := csu

include ../Makeconfig

routines = init-first libc-start $(libc-init) sysdep version check_fds \
libc-tls elf-init dso_handle
routines = init-first libc-start __setPthreadStruct $(libc-init) sysdep version check_fds \
libc-tls elf-init dso_handle rodata
aux = errno
elide-routines.os = libc-tls
static-only-routines = elf-init
Expand All @@ -42,7 +42,7 @@ install-lib = $(start-installed-name) g$(start-installed-name) $(csu-dummies)
generated += version-info.h
before-compile += $(objpfx)version-info.h

tests := tst-empty tst-atomic tst-atomic-long
tests := tst-empty
tests-static := tst-empty

ifeq (yes,$(build-shared))
Expand Down
2 changes: 1 addition & 1 deletion csu/Versions
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
libc {
GLIBC_2.0 {
# helper functions
__libc_init_first; __libc_start_main;
__libc_init_first; __libc_start_main; __setPthreadStruct; __ve_hw_specific01;
}
GLIBC_2.1 {
# New special glibc functions.
Expand Down
3 changes: 2 additions & 1 deletion ctype/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ headers := ctype.h

routines := ctype ctype-c99 ctype-extn ctype-c99_l ctype_l isctype
aux := ctype-info

tests := test_ctype

CFLAGS-ctype-info.c = -O0

include ../Rules
Loading

0 comments on commit 71db6d1

Please sign in to comment.