Skip to content

Commit

Permalink
[FreeBSD] Fix davix build and CPU reporting
Browse files Browse the repository at this point in the history
* [FreeBSD] fix Cpu freq reporting

* [FreeBSD] fix cpu type reporting

* [FreeBSD] fix davix build

- 'sed -i' needs an argument on posix sed (gnu sed does not)

* Don't use gcc explicitly, use cc
  • Loading branch information
mkrzewic authored Oct 6, 2024
1 parent 201f472 commit 7796472
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions builtins/davix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ ExternalProject_Add(DAVIX
-DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
-DLIB_SUFFIX=
PATCH_COMMAND sed -i "" -e "s|sed -i '| sed -i \"\" '|g" -e "s/gcc/cc/g" patch-curl-clock-gettime.sh
LOG_BUILD 1 LOG_CONFIGURE 1 LOG_DOWNLOAD 1 LOG_INSTALL 1
BUILD_BYPRODUCTS ${DAVIX_LIBRARIES}
TIMEOUT 600)
Expand Down
8 changes: 4 additions & 4 deletions core/unix/src/TUnixSystem.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4817,26 +4817,26 @@ static void GetFreeBSDSysInfo(SysInfo_t *sysinfo)
// it probably would be better to get this information from syscalls
// this is possibly less error prone
FILE *p = gSystem->OpenPipe("sysctl -n kern.ostype hw.model hw.ncpu "
"hw.physmem dev.cpu.0.freq", "r");
"hw.realmem dev.cpu.0.freq", "r");
TString s;
s.Gets(p);
sysinfo->fOS = s;
s.Gets(p);
sysinfo->fModel = s;
sysinfo->fCpuType = s;
s.Gets(p);
sysinfo->fCpus = s.Atoi();
s.Gets(p);
Long64_t t = s.Atoll();
sysinfo->fPhysRam = Int_t(t / 1024 / 1024);
s.Gets(p);
t = s.Atoll();
sysinfo->fCpuSpeed = Int_t(t / 1000000);
sysinfo->fCpuSpeed = Int_t(t);
gSystem->ClosePipe(p);
}

static void GetFreeBSDCpuInfo(CpuInfo_t*, Int_t)
{
//not yet implemented
Error("ListSymbols", "not yet implemented");
}
#endif

Expand Down

0 comments on commit 7796472

Please sign in to comment.