* Makefile.am (site.exp): Remove newlib_cflags. Add
multibuildtop. * testsuite/newlib.locale/UTF-8.c: Change fprintf's to printf's. * testsuite/lib/flags.exp: New file. * testsuite/lib/newlib.exp: Load flags.exp. (newlib_target_compile): Remove libgloss directory references. (newlib_init): Remove newlib_cflags references.
This commit is contained in:
		| @@ -1,3 +1,13 @@ | |||||||
|  | 2002-05-01  Thomas Fitzsimmons  <fitzsim@redhat.com> | ||||||
|  |  | ||||||
|  | 	* Makefile.am (site.exp): Remove newlib_cflags.  Add | ||||||
|  | 	multibuildtop. | ||||||
|  | 	* testsuite/newlib.locale/UTF-8.c: Change fprintf's to printf's. | ||||||
|  | 	* testsuite/lib/flags.exp: New file. | ||||||
|  | 	* testsuite/lib/newlib.exp: Load flags.exp. | ||||||
|  | 	(newlib_target_compile): Remove libgloss directory references. | ||||||
|  | 	(newlib_init): Remove newlib_cflags references. | ||||||
|  |  | ||||||
| 2002-04-30  Thomas Fitzsimmons  <fitzsim@redhat.com> | 2002-04-30  Thomas Fitzsimmons  <fitzsim@redhat.com> | ||||||
|  |  | ||||||
| 	* testsuite/lib/newlib.exp (newlib_target_compile): Change | 	* testsuite/lib/newlib.exp (newlib_target_compile): Change | ||||||
|   | |||||||
| @@ -291,7 +291,7 @@ site.exp: Makefile | |||||||
| 	@echo 'set tool_version $(VERSION)' >> $@-t | 	@echo 'set tool_version $(VERSION)' >> $@-t | ||||||
| 	@echo 'set srcdir $(srcdir)/testsuite' >> $@-t | 	@echo 'set srcdir $(srcdir)/testsuite' >> $@-t | ||||||
| 	@echo 'set objdir' `pwd` >> $@-t | 	@echo 'set objdir' `pwd` >> $@-t | ||||||
| 	@echo 'set newlib_cflags "$(NEWLIB_CFLAGS)"' >> $@-t | 	@echo 'set multibuildtop ./$(MULTIBUILDTOP)' >> $@-t | ||||||
| 	@echo 'set host_alias $(build_alias)' >> $@-t | 	@echo 'set host_alias $(build_alias)' >> $@-t | ||||||
| 	@echo 'set host_triplet $(build_triplet)' >> $@-t | 	@echo 'set host_triplet $(build_triplet)' >> $@-t | ||||||
| 	@echo 'set target_alias $(host_alias)' >> $@-t | 	@echo 'set target_alias $(host_alias)' >> $@-t | ||||||
|   | |||||||
| @@ -804,7 +804,7 @@ site.exp: Makefile | |||||||
| 	@echo 'set tool_version $(VERSION)' >> $@-t | 	@echo 'set tool_version $(VERSION)' >> $@-t | ||||||
| 	@echo 'set srcdir $(srcdir)/testsuite' >> $@-t | 	@echo 'set srcdir $(srcdir)/testsuite' >> $@-t | ||||||
| 	@echo 'set objdir' `pwd` >> $@-t | 	@echo 'set objdir' `pwd` >> $@-t | ||||||
| 	@echo 'set newlib_cflags "$(NEWLIB_CFLAGS)"' >> $@-t | 	@echo 'set multibuildtop ./$(MULTIBUILDTOP)' >> $@-t | ||||||
| 	@echo 'set host_alias $(build_alias)' >> $@-t | 	@echo 'set host_alias $(build_alias)' >> $@-t | ||||||
| 	@echo 'set host_triplet $(build_triplet)' >> $@-t | 	@echo 'set host_triplet $(build_triplet)' >> $@-t | ||||||
| 	@echo 'set target_alias $(host_alias)' >> $@-t | 	@echo 'set target_alias $(host_alias)' >> $@-t | ||||||
|   | |||||||
| @@ -4,6 +4,10 @@ | |||||||
| # is freely granted, provided that this notice is preserved. | # is freely granted, provided that this notice is preserved. | ||||||
| # | # | ||||||
|  |  | ||||||
|  | # flags.exp overrides the dejagnu versions of libgloss_link_flags, | ||||||
|  | # newlib_link_flags, and newlib_include_flags. | ||||||
|  | load_lib flags.exp | ||||||
|  |  | ||||||
| proc newlib_version { } { | proc newlib_version { } { | ||||||
|     global tool_version |     global tool_version | ||||||
|  |  | ||||||
| @@ -18,26 +22,19 @@ proc newlib_init { args } { | |||||||
|     global gluefile wrap_flags |     global gluefile wrap_flags | ||||||
|     global newlib_initialized |     global newlib_initialized | ||||||
|     global target_info |     global target_info | ||||||
|     global CFLAGS_FOR_TARGET |  | ||||||
|     # These values are initialized in the local site.exp file. |     # These values are initialized in the local site.exp file. | ||||||
|     global srcdir objdir |     global srcdir objdir | ||||||
|     global host_triplet target_triplet |     global host_triplet target_triplet | ||||||
|     # newlib_cflags comes from acinclude.m4, through the site.exp file. |  | ||||||
|     global newlib_cflags |  | ||||||
|     global old_ld_library_path |     global old_ld_library_path | ||||||
|  |  | ||||||
|     verbose "In newlib_init...\n" |     verbose "In newlib_init...\n" | ||||||
|  |  | ||||||
|     if { $newlib_initialized == 1 } { return; } |     if { $newlib_initialized == 1 } { return; } | ||||||
|  |  | ||||||
|     set CFLAGS_FOR_TARGET $newlib_cflags |  | ||||||
|  |  | ||||||
|     set_currtarget_info "wrap_compile_flags" "$newlib_cflags" |  | ||||||
|  |  | ||||||
|     if {[target_info needs_status_wrapper] != "" && \ |     if {[target_info needs_status_wrapper] != "" && \ | ||||||
| 	    [target_info needs_status_wrapper] != "0" && \ | 	    [target_info needs_status_wrapper] != "0" && \ | ||||||
| 	    ![info exists gluefile]} { | 	    ![info exists gluefile]} { | ||||||
| 	set gluefile ${objdir}/testglue.o; | 	set gluefile ${objdir}/testsuite/testglue.o; | ||||||
| 	set result [build_wrapper $gluefile]; | 	set result [build_wrapper $gluefile]; | ||||||
| 	if { $result != "" } { | 	if { $result != "" } { | ||||||
| 	    set gluefile [lindex $result 0]; | 	    set gluefile [lindex $result 0]; | ||||||
| @@ -66,18 +63,13 @@ proc newlib_target_compile { source dest type options } { | |||||||
| 	    [target_info needs_status_wrapper] != "0" && \ | 	    [target_info needs_status_wrapper] != "0" && \ | ||||||
| 	    [info exists gluefile] } { | 	    [info exists gluefile] } { | ||||||
| 	lappend options "libs=$gluefile" | 	lappend options "libs=$gluefile" | ||||||
| 	# This method of finding libgloss_target_dir may not work for some targets | 	lappend options "ldflags=$wrap_flags" | ||||||
| 	set libgloss_target_dir [lindex [split $target_triplet "-"] 0] |  | ||||||
| 	lappend options "ldflags=$wrap_flags -B$objdir/../libgloss/$libgloss_target_dir \ |  | ||||||
|                                              -L$objdir/../libgloss/$libgloss_target_dir \ |  | ||||||
|                                              -L$srcdir/../../libgloss/$libgloss_target_dir \ |  | ||||||
|                                              -L$objdir" |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     if [string match $host_triplet $target_triplet] then { |     if [string match $host_triplet $target_triplet] then { | ||||||
| 	if [string match "i686-pc-linux-gnu" $host_triplet] then { | 	if [string match "i686-pc-linux-gnu" $host_triplet] then { | ||||||
| 	    lappend options "libs=$objdir/crt0.o -lc" | 	    lappend options "libs=$objdir/crt0.o -lc -lgcc" | ||||||
| 	    lappend options "ldflags=-nostdlib -L$objdir/.libs -lgcc" | 	    lappend options "ldflags=-nostdlib -L$objdir/.libs" | ||||||
| 	} | 	} | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -141,11 +141,11 @@ int main() | |||||||
|  |  | ||||||
|     if (!setlocale(LC_CTYPE, "UTF-8")) |     if (!setlocale(LC_CTYPE, "UTF-8")) | ||||||
|       { |       { | ||||||
|         fprintf(stderr, "Failed to set UTF-8 locale.\n"); |         printf("Failed to set UTF-8 locale.\n"); | ||||||
|         return 1; |         return 1; | ||||||
|       } |       } | ||||||
|     else |     else | ||||||
|       fprintf(stderr, "Set UTF-8 locale.\n"); |       printf("Set UTF-8 locale.\n"); | ||||||
|  |  | ||||||
|     /* 2  Boundary condition test cases */ |     /* 2  Boundary condition test cases */ | ||||||
|     /* 2.1  First possible sequence of a certain length */ |     /* 2.1  First possible sequence of a certain length */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user