This is the mail archive of the 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]

PATCH: Objective-C testsuite on Solaris 2.8

All of the Objective-C tests were failling on Solaris 2.8 because
libobjc wants to use sched_get_priority_max and related functions.
These functions are provided in libposix4 on Solaris 2.8, not as part
of the standard C library.  So, the testsuite needs to know to link in
this library.  (Alternatively, the driver could learn this -- but it
doesn't even know to link in -lobjc, so there's no obvious place to
put the hook.  Plus, adding to the complexity, these functions are
also defined in *another* system library on Solaris 2.8 -- so some
users might want libposix4 and others might want the other one.)

Gerald, I've lost track of where platform-specific information like
this should be documented.  (There should be someplace that a Solaris
2.8 user could look to find out what tricks might be necessary.)  If
you'll point me at the right place, I'll add docs -- or, if you're
feeling disposed, you might want to just take care of it.  We want to
tell Solaris 2.8 users that they need to add -lposix4 to make
Objective-C programs work.

Tested on sparc-sun-solaris2.8, installed on the mainline and on the

Mark Mitchell         
CodeSourcery, LLC     

2001-05-11  Mark Mitchell  <>

	* lib/objc.exp: Add -lposix4 on Solaris 2.8.

Index: objc.exp
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/objc.exp,v
retrieving revision 1.5
diff -c -p -r1.5 objc.exp
*** objc.exp	2000/08/06 18:41:49	1.5
--- objc.exp	2001/05/11 16:13:13
*************** proc objc_target_compile { source dest t
*** 122,127 ****
--- 122,133 ----
      set ld_library_path "."
      lappend options "libs=-lobjc"
+     # On Solaris 2.8, we need to include libposix4 inorder to get
+     # sched_get_priority_max and such.
+     if [ishost "sparc-sun-solaris2.8"] {
+ 	lappend options "libs=-lposix4"
+     }
      if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } {
  	lappend options "libs=${gluefile}"
  	lappend options "ldflags=$wrap_flags"

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