Hotfix/sangshuduo/td 3913 mips compile support for develop (#6184)
* [TD-3913]<fix>: mips compile support. * [TD-3913]<fix>: mips64 support. * fix osSignal.c * fix tcrc32c.c * fix cmake. * fix osInc.h * fix gcc 4.8 compile error. Co-authored-by: Shuduo Sang <sdsang@taosdata.com>
This commit is contained in:
parent
c60fcb415b
commit
972a75c3fa
|
@ -102,6 +102,12 @@ IF ("${CPUTYPE}" STREQUAL "")
|
||||||
SET(TD_LINUX TRUE)
|
SET(TD_LINUX TRUE)
|
||||||
SET(TD_LINUX_64 FALSE)
|
SET(TD_LINUX_64 FALSE)
|
||||||
SET(TD_ARM_64 TRUE)
|
SET(TD_ARM_64 TRUE)
|
||||||
|
ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "mips64")
|
||||||
|
SET(CPUTYPE "mips64")
|
||||||
|
MESSAGE(STATUS "Set CPUTYPE to mips64")
|
||||||
|
SET(TD_LINUX TRUE)
|
||||||
|
SET(TD_LINUX_64 FALSE)
|
||||||
|
SET(TD_MIPS_64 TRUE)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
ELSE ()
|
ELSE ()
|
||||||
|
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can use, redistribute, and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License, version 3
|
||||||
|
* or later ("AGPL"), as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TDENGINE_OS_MIPS64_H
|
||||||
|
#define TDENGINE_OS_MIPS64_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <argp.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <endian.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <float.h>
|
||||||
|
#include <ifaddrs.h>
|
||||||
|
#include <libgen.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#include <locale.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <netinet/ip.h>
|
||||||
|
#include <netinet/tcp.h>
|
||||||
|
#include <netinet/udp.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <pwd.h>
|
||||||
|
#include <regex.h>
|
||||||
|
#include <semaphore.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
|
#include <sys/epoll.h>
|
||||||
|
#include <sys/eventfd.h>
|
||||||
|
#include <sys/file.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <sys/mman.h>
|
||||||
|
#include <sys/sendfile.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
#include <sys/statvfs.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/uio.h>
|
||||||
|
#include <sys/un.h>
|
||||||
|
#include <syslog.h>
|
||||||
|
#include <termios.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <wchar.h>
|
||||||
|
#include <wordexp.h>
|
||||||
|
#include <wctype.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
#include <sys/resource.h>
|
||||||
|
#include <error.h>
|
||||||
|
#include <linux/sysctl.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <poll.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -25,7 +25,7 @@
|
||||||
typedef void (*FLinuxSignalHandler)(int32_t signum, siginfo_t *sigInfo, void *context);
|
typedef void (*FLinuxSignalHandler)(int32_t signum, siginfo_t *sigInfo, void *context);
|
||||||
|
|
||||||
void taosSetSignal(int32_t signum, FSignalHandler sigfp) {
|
void taosSetSignal(int32_t signum, FSignalHandler sigfp) {
|
||||||
struct sigaction act = {{0}};
|
struct sigaction act; memset(&act, 0, sizeof(act));
|
||||||
#if 1
|
#if 1
|
||||||
act.sa_flags = SA_SIGINFO;
|
act.sa_flags = SA_SIGINFO;
|
||||||
act.sa_sigaction = (FLinuxSignalHandler)sigfp;
|
act.sa_sigaction = (FLinuxSignalHandler)sigfp;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _TD_ARM_
|
#if !defined(_TD_ARM_) && !defined(_TD_MIPS_)
|
||||||
#include <nmmintrin.h>
|
#include <nmmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue