Skip to content

Commit

Permalink
Eric K 24 Apr 07
Browse files Browse the repository at this point in the history
    -  Exteded the "altername_platform" mechanism to x86_64 linux
       and solaris.  The current alternate platforms found by configure
       are...
	 x86_64-pc-linux-gnu    -> i686-pc-linux-gnu
	 sparc64-sun-solaris    -> sparc-sun-solaris
	 sparc-sun-solaris      -> sparc-sun-solaris2.7
	 powerpc64-apple-darwin -> powerpc-apple-darwin
    -  The alternate platform can be overridden on the configure command line
         --with-boinc-alt-platform="platformname"

    m4/
        boinc_platform.m4
    sched/
        Makefile.am
    client/
        client_state.C
        cs_scheduler.C
        client_state.h


svn path=/trunk/boinc/; revision=12467
  • Loading branch information
SETIguy committed Apr 25, 2007
1 parent 7e2b39c commit 8a8ffc8
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 7 deletions.
2 changes: 1 addition & 1 deletion client/client_state.C
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CLIENT_STATE::CLIENT_STATE() {
core_client_version.minor = BOINC_MINOR_VERSION;
core_client_version.release = BOINC_RELEASE;
platform_name = HOSTTYPE;
#ifdef _WIN64
#ifdef HOSTTYPEALT
alt_platform_name = HOSTTYPEALT;
#endif
exit_after_app_start_secs = 0;
Expand Down
2 changes: 1 addition & 1 deletion client/client_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class CLIENT_STATE {
bool run_by_updater;
double now;
const char* platform_name;
#ifdef _WIN64
#ifdef HOSTTYPEALT
const char* alt_platform_name;
#endif
bool initialized;
Expand Down
4 changes: 2 additions & 2 deletions client/cs_scheduler.C
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p) {
" <hostid>%d</hostid>\n"
" <rpc_seqno>%d</rpc_seqno>\n"
" <platform_name>%s</platform_name>\n"
#ifdef _WIN64
#ifdef HOSTTYPEALT
" <alt_platform>\n"
" <name>%s</name>\n"
" </alt_platform>\n"
Expand All @@ -130,7 +130,7 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p) {
p->hostid,
p->rpc_seqno,
p->anonymous_platform?"anonymous":platform_name,
#ifdef _WIN64
#ifdef HOSTTYPEALT
alt_platform_name,
#endif
core_client_version.major,
Expand Down
32 changes: 30 additions & 2 deletions m4/boinc_platform.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,52 @@ AC_DEFUN([BOINC_PLATFORM],[
[override the default boinc platform]),
[boinc_platform="$withval"],
[boinc_platform=])
AC_ARG_WITH([boinc-alt-platform],
AC_HELP_STRING([--with-boinc-alt-platform],
[override the boinc alterate platform]),
[boinc_alt_platform="$withval"],
[boinc_alt_platform=])
AC_MSG_CHECKING([boinc platform])
if test -z "${boinc_platform}" ; then
boinc_platform=`echo $target | $SED -e 's/redhat/pc/' -e 's/[[0-9]]$//' -e 's/[[0-9]]$//' -e 's/\.$//' -e 's/[[0-9]]$//' -e 's/\.$//' -e 's/[[0-9]]$//'`
boinc_platform=`echo $target | $SED -e 's/redhat/pc/' -e 's/x86_64-unknown/x86_64-pc/' -e 's/[[0-9]]$//' -e 's/[[0-9]]$//' -e 's/\.$//' -e 's/[[0-9]]$//' -e 's/\.$//' -e 's/[[0-9]]$//'`
case "${boinc_platform}" in
sparc-sun-solaris)
if test "$COMPILER_MODEL_BITS" = "64" ; then
boinc_platform=`echo $boinc_platform | $SED 's/sparc/sparc64/'`
if test -z "$boinc_alt_platform" ; then
boinc_alt_platform=sparc-sun-solaris
fi
elif test -z "$boinc_alt_platform" ; then
boinc_alt_platform=sparc-sun-solaris2.7
fi
;;
x86_64*linux-gnu)
if test "$COMPILER_MODEL_BITS" = "32" ; then
boinc_platform="i686-pc-linux-gnu"
elif test -z "$boinc_alt_platform" ; then
boinc_alt_platform="i686-pc-linux-gnu"
fi
;;
powerpc-apple-darwin)
if test "$COMPILER_MODEL_BITS" = "64" ; then
boinc_platform="powerpc64-apple-darwin"
if test -z "$boinc_alt_platform" ; then
boinc_alt_platform="powerpc-apple-darwin"
fi
fi
;;
esac
fi
AC_DEFINE_UNQUOTED([HOSTTYPE],"$boinc_platform",[Platform identification used to identify applications for this BOINC core client])
AC_SUBST([boinc_platform],$boinc_platform)
AC_MSG_RESULT($boinc_platform)
AC_MSG_RESULT([$boinc_platform])
AC_MSG_CHECKING([alternate boinc platform])
if test -n "$boinc_alt_platform" ; then
AC_DEFINE_UNQUOTED([HOSTTYPEALT],"$boinc_alt_platform",[Alternate identification used to identify applications for this BOINC core client])
AC_SUBST([boinc_alt_platform],$boinc_alt_platform)
AC_MSG_RESULT($boinc_alt_platform)
else
AC_MSG_RESULT(none)
fi
])

2 changes: 1 addition & 1 deletion sched/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ EXTRA_PROGRAMS = fcgi \
# scripts that 'make install' should put in bindir
bin_SCRIPTS = start stop status

LDADD = -L. -lsched $(MYSQL_LIBS) $(BOINC_LIB) $(PTHREAD_LIBS)
LDADD = -L. -lsched $(MYSQL_LIBS) $(BOINC_LIB) $(PTHREAD_LIBS)

LIB_SCHED = libsched.a

Expand Down

0 comments on commit 8a8ffc8

Please sign in to comment.